Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

A white police officer shot a black teenager to death at a gas station in the city next door to Ferguson, Missouri, touching off clashes early Wednesday between demonstrators and law enforcement.

The mayor said that video from the confrontation, in the city of Berkeley, appeared to show the teenager pointing a gun at the officer, and police said a handgun was recovered at the scene. Police said the officer feared for his life.

“This was not the same as Ferguson,” Mayor Theodore Hoskins said.

He took pains to say that the shooting could not be compared to the police killing of Michael Brown in Ferguson or to the chokehold death of Eric Garner in New York. The mayor, who is black, pointed out that the Berkeley police department is majority-black.

He promised a thorough investigation but said that the video showed it was not a police officer going off “half-cocked.”

“Everybody don’t die the same,” he told reporters. “Some people die because the policeman initiated. Some people die because they initiated it. And at this point, our review indicates that the police did not initiate this, like Ferguson.”

A woman at the scene who identified herself as Toni Martin told NBC affiliate KSDK that the victim was her son, Antonio Martin, 18.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

She said Martin was on his way to meet his girlfriend when the fatal encounter happened and that he was not carrying a gun. “He only just left the house to go see her,” she said.

The mother said Antonio turned 18 in September and had attended nearby Jennings High School, and that she was trying to get him enrolled in the Jobs Corps employment program. She spoke as the body still lay covered on the ground outside the Mobil gas station.

“They got my baby laying out there. He's been out there for about two hours,” she said.

The shooting took place just after 11 p.m. local time Tuesday. Chief Jon Belmar of the St. Louis County police said that the officer was white and a six-year veteran. The officer’s name was not released. He was placed on administrative leave, Belmar said.

He said that the officer fired at least three rounds and that the victim did not fire any.

“These are nothing but tragedies,” Belmar said as he offered his condolences to the victim’s family. The officer “will have to carry the weight of this for the rest of his life,” he said, adding: “There are no winners here.”

An angry crowd of about 200 gathered at near the scene of the shooting, and there were angry clashes with police. A small fire broke out at a QuikTrip across the street from the Mobil but quickly went out, said John Henry, reporter with NBC affiliate KDSK.

“I can see about 50 cop cars,” said Bradley Rayford, a photographer at the scene. “They’re fighting and scuffling, the highway is blocked with cars, people are being arrested. Trash cans are on fire.”

The protest thinned by daybreak, and Belmar told an early morning news conference that four people had been arrested. He said that bricks and what were believed to be fireworks were thrown at officers, but he said police did not use tear gas.

One officer was being treated in a hospital emergency room for injuries to his lower leg sustained while he ran away, Belmar said, and another was treated at the hospital after sustaining injuries to his face from a brick.

Belmar said it was “pretty disturbing” that what appeared to be a firework had exploded next to a gas pump. “To come there carrying explosive devices is not safe for our city,” he said.

Gov. Jay Nixon said: “The events in Berkeley are a reminder that law enforcement officers have a difficult, and often dangerous, job in protecting themselves and law-abiding citizens.”

Police did not confirm the victim’s identity, but released surveillance video showing what they said was the teen pointing a gun at the officer. The time stamp on the video suggests the confrontation lasted almost a minute and shows someone raising an arm.

Berkeley is two miles from Ferguson, where the shooting death of Brown, an unarmed black teenager, by Officer Darren Wilson, who is white, set off protests that spread nationwide. A round of violent protests in Ferguson followed a grand jury’s decision not to indict Wilson.