A Milwaukee police officer was shot and killed Wednesday after his assailant reportedly yelled "I'm not going back to jail," a witness said.

Officer Michael Michalski, who was a 17-year veteran of the department and father of three, was shot after responding to a call around 5 p.m. Wednesday alerting police to the location of a man wanted in connection with gun and drug violations. About six minutes later, the alleged gunman began firing at responding officers, striking the cop.

The suspect, who was not shot during the incident, was arrested at the scene and the weapon was recovered.

"I'm saddened to inform you the officer injured did not make it today. This is a difficult time for us. He was well loved by the department and was a friend of mine," Milwaukee police chief Alfonso Morales said in a news conference.

Witnesses at the scene told FOX6 the man had a confrontation with an officer before shots were fired.

“I don't know if they was getting ready to run into his house, or if it was just a traffic stop, but you could see the man get right out the car and just get to shooting and yelling 'I'm not going back to jail. Y'all going to have to kill me,'” the witness told FOX6.

The shooting comes nearly two months after the death of Milwaukee Officer Charles Irvine Jr., who was killed after the squad car he was in crashed while in pursuit of a reckless driver.

"Words cannot describe the sorrow and anger I feel at this time. Our police officers as they do every single day, put their lives on the line to protect the people who live in this city,” Milwaukee mayor Tom Barrett said. “Tragically, in the last few hours, one of them lost their lives trying to protect us. We as a community are grieving.”

The Associated Press contributed to this report.