Violence and protests erupted in Milwaukee overnight after a man was fatally shot by police during a foot chase.

Police said the victim, 23, was armed with a handgun and shot dead by an officer after fleeing a traffic stop on Milwaukee's north side Saturday afternoon.

Hours later angry crowds took to the streets, smashing a police car and setting fire to another. One officer was injured by a flying brick; a gas station and auto-parts store were set alight. Police said gunshots were heard.

Milwaukee Mayor Tom Barrett pleaded for calm at an early morning news conference, asking residents to "do everything" to help restore order.

"If you love your son, if you love your daughter, text them, call them, pull them by the ears and get 'em home," he said.

"It is still a very tense situation for us," Harpole added.

The man who was killed has not been publicly identified.

Milwaukee's mayor said the man was struck twice — in the chest and the arm — and that he believes the officer involved had a body camera on at the time of the shooting.

Milwaukee Police Assistant Chief Bill Jessup told the Milwaukee Journal-Sentinel newspaper it wasn't clear if the gun was pointed at the officer.

"Those additional facts will come out in the coming days," Jessup said.

Police said the man shot had a "lengthy arrest record" and was carrying a semiautomatic handgun reported stolen in a burglary in Waukesha in March.

The name of the officer involved in the shooting has not been released. The races of the officer and the man shot also have not been released.

Police said the officer — a 24-year-old man who has been with the police department for six years and has been an officer for three years — was placed on administrative duty following the incident.

Local officials echoed Barrett's appeal for calm, with Milwaukee Common Council President Ashanti Hamilton asking for locals to help restore order.

"We understand the frustration people feel with the police community nationally. ... We have to go through the process of finding justice, but we have to be able to restore order to these neighborhoods," Hamilton said.

Aerial video shot by NBC station WTMJ showed a building at a gas station burning to the ground. A second fire broke out at an O'Reilly Auto Parts store less than a little less than mile away from the shooting.

WTMJ said it pulled its reporters from the scene due to threats of physical violence from some in the crowd. The Journal-Sentinel reported that one of its journalists was thrown to the ground and punched.

As the gas station burned, the founder of a local non-profit called "The Spread Love Initiative," Terrell Johnnies, went out to try to talk to people on the street and urge non-violence.

"I do not want my city to turn into a war zone," Johnnies told NBC News. "I was thinking hopefully they can see me and recognize me and stop the violence."

But after gunfire was heard, Johnnies said it was too dangerous to stay. "Once there were gun shots, that's when I decided I mostly definitely had to remove myself ... There was only one of me."