Chicago (CNN) A police officer, a doctor and a pharmacy resident 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 with whom he had had a relationship, Johnson said.

The gunman, Juan Lopez, 32, also died, police said. It is unclear whether he died from police gunfire or a self-inflicted gunshot wound, Johnson said.

Dr. Tamara O'Neal

Mercy Hospital named its employees killed in the shooting as Tamara O'Neal, 38, an emergency room physician, and pharmacy resident Dayna Less, 25, a recent graduate of Purdue University.

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

Read More