A gunman who shot and killed three people, including a police officer, at a hospital on the South Side of Chicago, had recently broken up with one of the victims, a doctor who he confronted to demand she give him back the engagement ring he bought her, police said Tuesday.
The suspected gunman, who died in the rampage, was identified as 32-year-old Juan Lopez, who had been kicked out of the Chicago Fire Academy in 2014 for harassing an individual, Chicago Police Superintendent Eddie Johnson said at a news conference.
On Monday, violence erupted about 3:30 p.m. in the parking lot of Mercy Hospital and Medical Center in the city's Bronzeville District and continued inside the hospital with police trading shots with Lopez, Johnson said.
He said Lopez had been in a romantic relationship with Dr. Tamara O'Neal, an emergency room physician at the hospital, who had recently broken off their engagement.
Lopez went to the hospital and allegedly confronted O'Neal in the parking lot, demanding she give back the engagement ring he gave her, Johnson said.
A friend who was with O'Neal at the time tried to intervene in the argument when Lopez pulled up his shirt and showed O'Neal's friend that he had a gun, officials said.
O'Neal called 911 to report Lopez and told a dispatcher that he was armed, Johnson said.
As police officers arrived at the hospital, Lopez shot and killed O'Neal in the parking lot and ran into the hospital, Johnson said.
When he entered the lobby, two women, including Dayna Less, 25, a pharmacy resident in training, were getting off an elevator and Lopez allegedly opened fire on them for no apparent reason, Johnson said.
Less was shot and killed in the encounter, Johnson said.
Lopez then ran back out of the hospital and fired at officers in a squad car who were trying to shield O'Neal's body with their vehicle.
"He fired at those units and ran back into the hospital," Johnson said of Lopez.
He said Officer Samuel Jimenez chased Lopez into the facility and down a hallway, where a gun battle broke out.
"What we do know is that Lopez was struck twice," Johnson said. "So, it's only fair to assume that one of our bullets struck him."
An autopsy conducted by the Cook County Medical Examiner's Office showed that while Lopez was shot in the abdomen, he died from a self-inflicted gunshot wound to the head.
(MORE: 'A senseless loss of life': 3 victims of Chicago hospital shooting mourned)He said Lopez was armed with a 9mm handgun and had a permit to carry a concealed weapon. Lopez had purchased four guns over the past five years, Johnson said.
"This tears at the soul of our city," Chicago Mayor Rahm Emanuel said at a news conference Monday night. "It's the face and consequence of evil."
O'Neal's family said she broke up with Lopez in September.
"She saw something in the relationship that did not line up with the way she wanted to live the rest of her life," said O'Neal's father, Thomas O'Neal, told ABC Chicago station WLS-TV.
(MORE: Suspect in shooting of 7 South Carolina officers charged with murder)O'Neal was a 38-year old emergency room doctor, who at been a resident at Mercy hospital before joining the staff in 2016, officials said. Less graduated from Purdue University in May and became a pharmacy resident at the hospital in July, officials said.
Jimenez, 28, a married father of three young children, had been a member of the Chicago Police Department less than two years, Johnson said.
"The City of Chicago lost a doctor, pharmaceutical assistant and a police officer, all going about their day, all doing what they love," Emanuel said.
The emergency room at Mercy hospital was closed most of the day Tuesday but reopened in the afternoon.
"A hospital should be a safe place," Dr. Patrick Connor, the emergency department director at Mercy, said during the Monday night news conference. "Every shooting in America is a tragedy -- it is a national tragedy. And it is especially senseless when a shooting occurs in a healing space of a hospital."
The hospital had its first active-shooter drill three or four weeks ago, said Michael Davenport, the chief medical officer.
"We never thought we would have to experience what we had," Davenport said. "Everyone did what they were trained to do."
About 200 patients were being cared for at the time of the shooting, he added. Everyone from the emergency room was relocated.
(MORE: 2 Massachusetts police officers shot in Cape Cod)"When you look at what the officers did in responding, while what happened was horrific, they did save and potentially prevent a lot worse loss of life," Emanuel said Tuesday.
(MORE: 2 Dallas police officers shot and critically wounded, authorities say)Johnson echoed Emanuel's assessment in a post on Twitter. Jimenez "saved a lot of lives," Johnson wrote on Twitter, adding that the suspect "was just shooting" and they "just don't know how much damage he was prepared to do."
Jimenez's police colleagues were mourning his death. Officers stood at attention and saluted Monday night as his body was removed from the hospital and taken to the medical examiner's office.
"Today, the Fraternal Order of Police lost a valued brother -- a courageous police officer who got up this morning, went to work and wanted to protect the city of Chicago," said Kevin Graham, president of Chicago chapter of the police union. "He did that today, and he did so with his life."
Less than 24 hours after Jimenez was shot to death, another Chicago police officer was shot in an unrelated gun battle with a suspect who opened fire on him and his partner, Johnson said. Police returned fire and shot and wounded the suspect in the neck.
Emanuel said one of the officers involved in Tuesday's shooting was hit in the back of his bulletproof vest and was being treated for bruising left by a bullet.
"These are young men in this situation doing heroic work to protect us and other residents," Emanuel said at Tuesday news conference. "Here are two officers less than 24 hours [after Jimenez was shot] doing their job, stopping somebody that in the end did have a gun."
ABC News' Joshua Hoyos contributed to this report.