CHICAGO (CBS)–Four people were killed, including a Chicago police officer, after a gunman opened fire Monday afternoon on the Mercy Hospital campus. The gunman is among the deceased.

Police confirmed the officer who died is Samuel Jimenez. He had recently finished his probationary period, Police Superintendent Eddie Johnson said at a press conference Monday night.

Police honored Jimenez in a procession leaving University of Chicago Hospital, where he died.

The tragic events started to unfold around 3 p.m., Johnson said, when a verbal altercation broke out in the parking lot of the hospital. Authorities have confirmed 32-year-old Juan Lopez shot and killed his former fiancée, emergency room doctor Tamara O’Neal, before going inside the hospital, where he killed two others, including Jimenez, and pharmacy resident Dayna Less.

Dr. Tamara O’Neal was shot and killed inside the hospital where she worked. @cbschicago pic.twitter.com/KpCLjEtFyA — Charlie De Mar (@CharlieDeMar) November 20, 2018

Jimenez was taken from the scene of the shooting in critical condition to University of Chicago Hospital, where he later died, police said.

A second Chicago police officer was struck by gunfire on his holster.

A visibly shaken Mayor Rahm Emanuel shared somber words about those lost today in what he described as a heroic effort. He said the shooting “tears at the soul of our city.”

Speaking at the police news conference, Emanuel said the hospital staff and the police officer lost were “all doing what they love.”

Emanuel said the shooting “tears at the soul of our city.”

Johnson said officers ran toward the gunfire after police arrived and saw Lopez armed. Lopez started firing his gun at a police cruiser, and police chased him into the hospital.

Inside the building, Lopez fatally shot 24-year-old female pharmacy resident Dayna Less as she was getting off an elevator. Less is a graduate of Purdue University, hospital staff said.

Sources tell CBS 2 Lopez was fatally shot by a SWAT team officer. At the police conference, Johnson said it was unclear how Lopez was killed.

By 4:40 p.m., police had secured the hospital and all patients were safe, according to hospital officials.

Johnson hailed the officers who responded to the shooting as heroes and said the tragedy could have been worse if they gunman had not been stopped.

Superintendent Eddie Johnson: “When they pulled up they heard the gunshots and they did what heroic officers always do — they ran to gunfire. They went because that’s what we do.” @cbschicago pic.twitter.com/SG4bIMY6MI — Megan Hickey (@MeganHickeyCBS2) November 20, 2018

“Those officers who responded today saved a lot of lives,” Johnson said. “A woman who got off the elevator–she did nothing and he just shot her. We just don’t know how much damage he was prepared to do.”

It's with profound sadness that we share the death of PO Samuel Jimenez from tonight's senseless active shooter incident. Please pray for his family, his fellow officers & the entire #ChicagoPolice Department. Supt Eddie Johnson & @ChicagosMayor will hv a press briefing shortly pic.twitter.com/2onFeyaSDK — Anthony Guglielmi (@AJGuglielmi) November 20, 2018

A #ChicagoPolice officer has been shot in the active shooter incident at Mercy Hospital. He is in critical condition but receiving excellent care. Please send your prayers. pic.twitter.com/kFfMY1ZmF7 — Anthony Guglielmi (@AJGuglielmi) November 19, 2018

24th Pl & Michigan per @AJGuglielmi Reports of multiple victims from incident at 26th and Michigan. @cbschicago pic.twitter.com/s6rwRF6DFN — Jeremy Ross (@JeremyAdamRoss) November 19, 2018

Maria Correa, who was in the hospital at 2525 S. Michigan Ave., told CBS 2 she saw blood in one of the hospital’s entrances and reported hearing multiple shots.

Correa said she was waiting in the lobby on her way up to the 12th floor, and officers told her to close the doors and stay quiet.

People exit Mercy Hospital with their hands up after shots were fired on the hospital campus. Family members are being asked to meet at East 27th Street and King Drive, where a warming center has been set up. https://t.co/LrxdbXyhHp pic.twitter.com/MZbe2JmLgd — CBS Chicago (@cbschicago) November 19, 2018

Hector Aditia was inside the hospital when he saw the gunman shoot one of the victims multiple times in the parking lot. Aditia said officers responded quickly and the gunman and the officers exchanged gunfire.

Jennifer Eldridge, who works in the hospital pharmacy, said the shooter entered the building and she and others barricaded themselves in an interior room. She said she heard the shooter argue with people outside and also heard several more gunshots.

Eldridge spoke to CBS 2, shivering in the cold, because she left all her belongings inside.

She was helping a patient at the pharmacy window when she heard gunfire.

“The patients started to run, he was inside,” Eldridge said. “We closed out shutters and called active shooter.”

Hospital employees just completed active shooter drills on Nov. 8.

Another hospital employee, Patricia Rinella, said she was terrified as she and others barricaded themselves into a room with a copy machine blocking the door. She said she could hear the gunman getting closer as she crouched on the floor hiding.

“It was too close for comfort,” Rinella said. “It just seemed like he was all over the place.”

Dunbar High School had been placed on lockdown, but the school day was almost over and the students were released shortly before 4:30 p.m.

Police Activity: Reports of shots fired in the vicinity of 26th and Michigan near Mercy Hospital. Avoid area. Heavy police response incoming pic.twitter.com/yHe19SN8SY — Anthony Guglielmi (@AJGuglielmi) November 19, 2018

About two hours after the shooting, SWAT teams were evacuating people who were hiding in the hospital.

“We hid for a little while in one of the rooms and barricaded the door.” Witnesses describe scene after gunman reportedly opened fire on the campus of Mercy Hospital in Chicago. pic.twitter.com/5eqdn3ybZf — CBS Chicago (@cbschicago) November 19, 2018

Dr. Patrick Connor, head of Emergency Medicine at Mercy Hospital, was emotional during a press conference Monday night when speaking about the two staff members who died in the shooting.

He said O’Neal was “Simply one of the most fascinating, hard working people,” adding that she grew up in Portage, Indiana and graduated from the University of Illinois at Chicago in 2016.

“From the Mercy family, to the community that we serve, for our physicians and technicians and first responders, we train for this, but we never think we have to experience what we’ve had today. We’ll all need healing to say the least.”