MILWAUKEE — The black man whose killing by police touched off rioting in Milwaukee was shot by a black officer after turning toward him with a gun in his hand, the police chief said Sunday, as Wisconsin’s governor put the National Guard on standby against any further violence on the city’s mostly black north side.

Police Chief Edward Flynn cautioned that the shooting was still under investigation and authorities were awaiting autopsy results, but that based on the silent video from the unidentified officer’s body camera, he “certainly appeared to be within lawful bounds.”

At the same news conference, Mayor Tom Barrett said a still image pulled from the footage clearly showed the gun in 23-year-old Sylville K. Smith’s hand as he fled a traffic stop Saturday.

“I want our community to know that,” Barrett said. But he also called for understanding for Smith’s family.

“A young man lost his life yesterday afternoon,” the mayor said. “And no matter what the circumstances are, his family has to be hurting.”

Flynn refused to identify the officer who shot Smith but said he is black. The police chief said he wasn’t sure what prompted the stop but described Smith’s car as “behaving suspiciously.”

After watching the officer’s body camera footage, Flynn said the entire episode took about 25 seconds, from the start of the traffic stop until shots were fired. He said Smith ran “a few dozen feet” and turned toward the officer while holding a gun.

“It was in his hand. He was raising up with it,” the chief said. He said it was unclear how many rounds the officer fired.

Earlier Sunday, Gov. Scott Walker activated Wisconsin’s National Guard, and 125 Guard members were reporting to local armories to prepare for further instructions. Flynn said they would not be deployed unless the chief decided to do so.

“I’m hopeful that will not be necessary,” the mayor said. “But if it is necessary, we will do so.” Flynn said 150 department officers specially trained in managing big protests had also been mobilized.

Six businesses were burned in the unrest that spilled past midnight Sunday. Seventeen people were arrested, Flynn said, and four officers were hurt, none seriously.

Milwaukee Alderman Khalif Rainey, who represents the neighborhood that erupted, said the city’s black residents are “tired of living under this oppression.”

“Now this is a warning cry. Where do we go from here? Where do we go as a community from here?” he asked.

Flynn said Smith had a lengthy criminal record with Milwaukee police. Online court records showed a range of charges against Smith, many of them misdemeanors.

The Milwaukee Journal Sentinel reported that Smith was also charged in a shooting and was later charged with pressuring the victim to withdraw testimony that identified Smith as the gunman. The charges were dropped, but it was not immediately clear why.