Police struggled to control the crowd that gathered at the scene of the shooting
US police have clashed with protesters in St Louis after an officer shot dead a black teenager near where Michael Brown was killed in August, a death that triggered national protests.
A crowd of about 100 people gathered at the scene early on Wednesday following scuffles the night before.
St Louis County police said the man who was shot had pulled a gun at a petrol station and pointed it at the officer.
For weeks there have been protests about alleged police brutality.
Berkeley is about two miles from the suburb of Ferguson, where the 18-year-old Brown was shot dead by a white officer.
The victim of the Berkeley shooting was named by local media as Antonio Martin, 18, citing his mother.
Police spokesman Sgt Brian Schellman said that an officer had been conducting a routine check at a petrol station in North Hanley Road on Tuesday evening when he saw two men and approached them.
Police say the victim was shot after producing a handgun at a petrol station
He said that one of the men pointed a handgun at the officer.
"Fearing for his life, the Berkeley officer fired several shots, striking the subject, fatally wounding him," he said.
The second man fled, Sgt Schellman said, adding that the handgun had been recovered.
Laura Hettiger, a reporter for St Louis TV station KMOV, told the BBC: "As soon as I got there police started firing off flash bangs which are used to, hopefully, disperse some of the crowd.
"A lot of police are still on the scene. A couple of people have ended up looting the gas station just across the street."
Michael Brown, who was unarmed, was killed by a white police officer who said he opened fire after a struggle in a patrol car in Canfield Drive, Ferguson.
His death sparked protests, sometimes violent, and further unrest followed a grand jury's decision not to charge the officer.
There were further demonstrations after the death of Eric Garner, 43, a black man who died while being held down by a white police officer in July in New York. Again, a grand jury decided against charging the officer.