The US mayor of a St Louis suburb appealed for calm after a white police officer killed a black 18-year-old.

The shooting reignited tensions that have lingered since the death of Michael Brown in nearby Ferguson.

A crowd of about 300 people gathered at the petrol station in Berkeley where Antonio Martin was shot late on Tuesday.

They hurled rocks and bricks in a scene reminiscent of the sometimes-violent protests that followed Mr Brown's death in August.

More than 50 police officers responded, and used pepper spray but not tear gas. Four people were arrested on charges of assaulting officers.

A smaller crowd gathered last night. Photos posted by the St Louis Post-Dispatch on its website showed dozens of people gathered at the petrol station for a vigil.

Protesters also marched along an interstate highway, blocking some traffic.

Mr Martin's was the third fatal shooting of a young black man by a white police officer in the St Louis area since Mr Brown was killed by Ferguson officer Darren Wilson on August 9.

Kajieme Powell, 25, was killed on August 19 after approaching St Louis officers with a knife. Vonderrit Myers, 18, was fatally shot on October 8 after allegedly shooting at a St Louis officer.

Each killing has led to protests, as did a grand jury's decision last month not to charge Mr Wilson over Mr Brown's death.

But unlike the shooting of Mr Brown, which was not captured on video, Berkeley mayor Theodore Hoskins said surveillance footage appeared to show Mr Martin pulling a gun on the unidentified 34-year-old officer who questioned him and another man about a theft at a store. Mr Brown was unarmed.

"You couldn't even compare this with Ferguson or the Garner case in New York," Mr Hoskins said, referring to the chokehold death of Eric Garner, another black man killed by a white police officer.

He also noted that unlike in Ferguson, where a mostly white police force serves a mostly black community, more than half of the officers in his city of 9,000 are black, including senior command staff.

St Louis County Police Chief Jon Belmar did not provide more details about the theft Mr Martin was being questioned about.

He said Mr Martin pulled a loaded 9mm handgun and the officer fired three shots while stumbling backward. One hit Mr Martin, who did not fire his own gun. He died at the scene.

Lawyer Brian Millikan, who is representing the policeman, said the officer was lucky to be alive and certain he had no choice but to use lethal force.

St Louis County police and the city of Berkeley are investigating the shooting, which Mr Belmar called a tragedy for both Mr Martin's family and the officer, who has been on the force for six years.

The officer was not wearing his body camera, and his cruiser's dashboard camera was not activated because the car's emergency lights were not on, Mr Belmar said.

Police released surveillance video clips from three different angles. The men can be seen leaving the store as a patrol car drives up. The officer gets out and speaks with them.

About 90 seconds later, one appears to raise his arm, though it is difficult to see what he is holding because they were several feet from the camera.

Mr Belmar said it was a 9mm handgun with one round in the chamber and five more in the magazine.

Police are searching for the other man, who ran away.

Mr Belmar said Mr Martin had a criminal record that included three assault charges, plus charges of armed robbery, armed criminal action and unlawful use of a weapon.

His mother, Toni Martin-Green, told the St Louis Post-Dispatch that he was the oldest of four children.

"He's like any other kid who had dreams or hopes," she said. "We loved being around him. He'd push a smile out of you."