A Milwaukee police officer chased down a robbery suspect and was fatally shot in an exchange of gunfire early Tuesday. The suspect also died from a gunshot wound, police said.

Milwaukee Police Chief Jeffrey Norman said officers located the 19-year-old suspect when they arrived at the robbery scene about 1:15 a.m. on the city's south side. The man ignored their commands and fled on foot.

Norman said one officer caught up with the suspect and a struggle ensued. Both men fired their weapons. The wounded officer, a 37-year-old man with more than four years with the Milwaukee Police Department, died at a hospital, he said.

WISCONSIN WOMAN SENTENCED TO 15 YEARS IN PRISON FOR HER ROLE IN THE FATAL SHOOTING OF HER 18-YEAR-OLD SON

The suspect, a 19-year-old Milwaukee man, died at the scene. The chief said it was not immediately clear if the suspect died from the shot fired by the officer or a self-inflicted gunshot wound.

Wisconsin Fox News graphic

A Wisconsin police officer was killed in a shootout with a robber. The robber was also killed.

"Milwaukee, our hearts are heavy. Milwaukee Police Department hearts are heavy. My heart is heavy," Norman told a news conference. "The violence needs to stop!"

WISCONSIN GOV. EVERS APPOINTS FORMER MILWAUKEE HEALTH COMMISSIONER TO CABINET

Norman said the shooting remains under investigation so identities would not be immediately released. He said the city and its police department are in mourning.

"One of our finest, who put on that uniform, put on that badge, went into work last night has paid the ultimate sacrifice for protecting our community. Milwaukee, we need your prayers, we need your support."

CLICK HERE TO GET THE FOX NEWS APP

Milwaukee Mayor Cavalier Johnson, angry and frustrated, said the entire community, not just police, must play an active role in trying to combat gun violence and making the city safe.

"The men and women of the Milwaukee Police Department, it’s not just them — it’s up to all of us," the mayor said. "Enough of this, enough of this. There’s no excuse for this. This officer should not be dead right now."