A gunman shot a doctor to death outside a Chicago hospital on Monday before storming the facility and killing a pharmaceutical assistant and a police officer during an exchange of gunfire and dying in the rampage, officials said.

The gunman was the ex-fiance of the doctor, Chicago media outlets reported, with one witness saying he demanded a ring back.

The shooting sent doctors and patients streaming out of the facility, some with their hands up, as heavily armed police officers sought to secure the hospital.

“The city of Chicago lost a doctor, a pharmaceutical assistant and a police officer, all going about their day, all doing what they love,” Mayor Rahm Emanuel told reporters.

“This tears at the soul of our city. It is the face and consequence of evil.

The gunman, after killing the doctor, fired at arriving police officers with a single handgun, Johnson said.

The gunman, whose name has not been released, then burst into the hospital. Officers followed him inside and exchanged gunfire with him for several minutes, Johnson said.

Officer Samuel Jimenez, who joined the Chicago police force last year, died during the gun fight, officials said. The 28-year-old was married with children and the second Chicago officer killed in the line of duty this year.

“There’s no doubt in my mind that all of those officers who responded were heroes and they saved a lot of lives, because we just don’t know how much damage he (the gunman) was prepared to do,” Johnson said.

In a sign of the random nature of the rampage, the pharmacy assistant shot by the gunman just happened to be getting off an elevator, Johnson said. Her name has not been released.

The gunman also died but it was not immediately clear if he shot himself or was struck by a police officer’s bullet, Johnson said.

Another officer was spared injury when a bullet lodged itself in his holster.

In Denver, another shooting left one person dead and four wounded on Monday. At least one suspect remained at large after the shooting on a downtown street corner while police said the injuries were “believed to be non-life threatening.”