Four people have died in a shooting at a hospital in Chicago.
A policeman and two female medical staff are among the dead after a gunman opened fire at Mercy Hospital at about 3pm on Monday.
The gunman also died, although it is not yet clear if he took his own life.
A second police officer avoided injury when a bullet fired in his direction got lodged in his gun.
Authorities said a man pulled out a gun outside the hospital and killed an emergency room doctor with whom he had a relationship.
He then ran into the hospital and shot a pharmacy resident and a police officer.
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.”
Mercy Hospital said the staff who died were Tamara O’Neal, 38, an emergency room physician who never worked on Sunday because of her religious faith, and Dayna Less, 25, a first year pharmacy resident who had recently graduated from Purdue University.
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.
— Chicago Police (@Chicago_Police) November 20, 2018
The officer was identified as Samuel Jimenez, 28, who joined the department in February 2017 and had recently completed his probationary period. Police said he was married and the father of three children.
The identity of the gunman was not immediately released.
The chain of events that led to the shooting began with an argument in the hospital parking area involving the gunman and Ms O’Neal, police said.
When a friend of Ms O’Neal tried to intervene, “the offender lifted up his shirt and displayed a handgun,” said police.
Shots were fired at a 2nd CPD officer in the Mercy Hospital Shooting, but he wasn't injured. Instead, the bullet struck his holster and embedded itself in his gun: https://t.co/hVPwgbrkXv pic.twitter.com/OvMI0ln3l6
— ABC 7 Chicago (@ABC7Chicago) November 20, 2018
The friend ran into the hospital to call for help, and the gunfire began seconds later, with the attacker killing Ms O’Neal.
After Ms O’Neal fell to the ground, the gunman “stood over her and shot her three more times,” a witness named James Gray told reporters.
When officers arrived, the suspect fired at their squad car and then ran inside the hospital. The police gave chase.
Inside the medical centre, the gunman exchanged fire with officers and “shot a poor woman who just came off the elevator” before he was killed, police said, referring to pharmaceutical assistant Ms Less.
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 that sounded much closer, just outside the door.
“I could tell he was now inside the lobby. There was screaming,” she recalled.
The door jiggled, which Ms Eldridge believed was the shooter trying to get in. Some 15 minutes later, she estimated, a Swat team officer knocked at the door, came inside 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 said.
Maria Correa hid under a desk, clutching her four-month-old son, Angel, while the violence unfolded.
Ms 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 under the desk “trying to protect her son” for 10 to 15 minutes.
“They were the worst minutes of our lives,” Ms Correa said.