A police officer, a doctor and a pharmaceutical assistant were killed after a Monday afternoon shooting at Chicago's Mercy Hospital, Mayor Rahm Emanuel said.

The shooting was a domestic incident, Chicago Police Superintendent Eddie T. Johnson said. The gunman's first victim was a woman he had previously had a relationship with, Johnson said.

The gunman also died, though it is unclear whether he died from police gunfire or a self-inflicted gunshot wound, Johnson said.

In a statement Monday, Mercy Hospital named its employees killed in the shooting as emergency room physician Tamara O'Neal and pharmacy resident Dayna Less -- a 25-year-old recent graduate of Purdue University.

PHOTOS: Multiple people dead in Chicago hospital shooting

The hospital paid tribute to police and security staff, saying it was "deeply saddened by the tragedy."

"Every shooting in America is a tragedy, and it is especially senseless when a shooting occurs in the healing space of a hospital," it said.

Chicago Police identified the deceased officer as Samuel Jimenez, a father of three. He joined the force in February 2017 and recently completed probationary training, becoming a full-fledged officer, Johnson said. A procession was held for him Monday night.

"Today, we mourn Chicago Police Officer Samuel Jimenez. His heroic actions saved countless lives. He ran toward danger. He ran toward those shots. He ran into fire. Selflessly," the department said on Twitter.

"What I would ask is that you keep all the victims of today's horrific incident in your thoughts and prayers," Johnson said.

How the shooting unfolded

Around 3:30 p.m., the gunman approached one of the female victims -- a hospital employee -- in the parking lot, Johnson said. As they started arguing, a friend of the woman attempted to intervene.

The gunman lifted his shirt and revealed a handgun, prompting the friend to flee. Two 911 calls in rapid succession reported an assault and then gunshots, Johnson said.

When officers responded to the scene, the gunman opened fire on them before they could exit their vehicle. Officers followed him into the hospital and exchanged gunfire with him, Johnson said.

During the shootout, Officer Jimenez was fatally wounded along with a hospital employee as she exited an elevator.

The officers "saved a lot of lives because we just don't know how much damage he was prepared to do," Johnson said of the gunman.

'I don't even have words'

Police secured the hospital and patients are safe, the hospital said.

The incident drew large numbers of law enforcement and emergency responders. Vehicles with flashing lights cordoned off the blocks around the busy medical center.

Witness Steven White told CNN's Ryan Young that he was in the emergency room when he saw the shooter firing at police.

"We heard some shots so we all ran to the emergency window, we see this guy out there, military style, shooting at the police -- pow, pow, pow," he said.

When White looked outside he said he saw a person lying on the ground by the main entrance. The shooter turned around and opened fire again before running inside the main entrance.

"I don't even have words to say how I was feeling," White said. "It's sad, you can't even come to the hospital for treatment."

At least 15 medic units were sent to Mercy Hospital, Chicago Fire Department Public Information Officer Larry Merritt said.

Democratic Sen. Dick Durbin of Illinois thanked law enforcement members for their response.

"My heart is with Mercy Hospital in Chicago tonight. I am praying for the victims, their families, and those who were injured during the shooting this afternoon. And I am extremely grateful to the Chicago Police Department who responded with bravery," he said on Twitter.