AP/SUN TIMES - A gunman opened fire Monday at a Chicago hospital, killing a police officer and two hospital employees in an attack that began with a domestic dispute and exploded into a firefight with law enforcement inside the medical center. The suspect was also dead, authorities said.

It was not immediately clear if the attacker took his own life or was killed by police at Mercy Hospital on the city's South Side, police said.

"The city of Chicago lost a doctor, pharmaceutical assistant and a police officer, all going about their day, all doing what they loved," Mayor Rahm Emanuel said, fighting back tears. "This just tears at the soul of our city. It is the face and a consequence of evil."

The chain of events that led to the shooting began with an argument in the hospital parking lot involving the gunman and a woman with whom he was in a domestic relationship, police said.

When a friend of the woman's tried to intervene, "the offender lifted up his shirt and displayed a handgun," Chicago Police Superintendent Eddie Johnson said.

The woman's friend ran into the hospital to call for help, and the gunfire began seconds later, with the attacker killing the woman he was arguing with, whom Johnson described only as a hospital employee.

When officers arrived, the suspect fired at their squad car and then ran inside the hospital. The officers gave chase.

Inside the hospital, the gunman exchanged fire with officers and "shot a poor woman who just came off the elevator" before he was killed, Johnson said.

The slain officer was identified as Samuel Jimenez, who joined the department in February 2017 and had just recently completed his probationary period, Johnson said.

The identities of the other victims, and the gunman, were not immediately released.

Television footage of the aftermath showed several people, including some wearing white coats, walking through a parking lot with their arms up.

Jennifer Eldridge was working in a hospital pharmacy when she heard three or four shots that seemed to come from outside. Within seconds, she barricaded the door, as called for in the building's active shooter drills. Then there were six or seven more shots, now much closer, just outside the door.

"I could tell he was now inside the lobby. There was screaming," she recalled.

The door jiggled, which Eldridge believed was the shooter trying to get in. Some 15 minutes later, she estimated, a SWAT team officer knocked at the door, came in and led her away. She looked down and saw blood on the floor but no bodies.

"It may have been 15 minutes, but it seemed like an eternity," she told a reporter.

Maria Correa hid under a desk, clutching her 4-month-old son, Angel, while the violence unfolded. Correa was in the waiting area of the hospital for her mother-in-law's doctor appointment when a hospital employee told them to lock themselves in offices.

She lost track of how many shots she heard while she waited under the desk, "trying to protect her son," for 10 to 15 minutes.

"They were the worst minutes of our lives," Correa, a Chicago resident, said.

Dennis Burke, who lives across the street from the hospital, was getting off the bus when he heard six gunshots and saw officers nearby with their guns drawn.

"I dropped my groceries," Burke said. He ducked behind the bus for cover and watched as 50 to 100 people poured out of the hospital, including a victim on a stretcher.

People "were helping each other over the fence, trying to get away," Burke said. "People were running across the street, right past me -- everybody from doctors to what looked like patients, people of all ages."

A message left for hospital officials was not immediately returned.

Mercy has a rich history as the city's first chartered hospital. It began in 1852, when the Sisters of Mercy religious group converted a rooming house. During the Civil War, the hospital treated both Union soldiers and Confederate prisoners of war, according to its website.

A shooting took place at Mercy Hospital & Medical Center this afternoon. The shooting at Mercy Hospital is over. Chicago Police Department have secured the hospital and patients are safe.