An armed man who barricaded himself inside a Los Angeles restaurant with hostages after allegedly carrying out two carjackings on Thursday was shot and killed, police said, though it was not known whether an officer fired the fatal bullet.

Heavily armed officers stormed the barbecue restaurant in Downey, southeast of Los Angeles, to end the two-hour hostage drama, said commander Mike Parker of the Los Angeles County Sheriff’s Department. Several shots were fired and no one else was hurt, he said.

Investigators would determine whether the gunman was killed by a police bullet or his own weapon, he said.

"He had absolutely no concern for the safety of the public," Parker told reporters.

Dozens of people were able to escape the restaurant, which was in the middle of a busy dinner rush, authorities said. About a half-dozen people were taken hostage, police and media reported.