Updated

A disgruntled doctor had slipped into his former workplace and was firing through the halls of Bronx Lebanon Hospital. But the staff there still had patients to take care of — like the newborn with a bowel obstruction who needed intensive care.

"It was the middle of the lockdown," said Dr. Madgy Mikhail, head of the department. But the baby was vomiting. So the doctor and a nurse shielded the infant and, with an armed SWAT team escort, went down a floor to the neonatal intensive care unit so the baby could be treated.

The team had, coincidentally, just that morning received training on how to handle an active shooter in the hospital. Hours later, Dr. Henry Bello, who resigned in 2015 in lieu of being fired over sexual harassment allegations, hid a rifle in his lab coat and opened fire inside Bronx Lebanon. He killed Dr. Tracy Sin-Yee Tam and wounded six others before killing himself.

Similar instances of bravery played out in other departments around the hospital amid the June 30 rampage:

— The emergency room nurses who kept going out in the hallways to bring back blood transfusion packs;

— The hospital staff members who encountered Dr. Hassan Tariq shot in the wrist, wrapped a sheet around his wound to stanch the blood and carried him down nine flights of stairs to the operating room before collapsing in tears;

— The doctors who operated on their colleague Tariq while shots rang out;

— The off-duty physician who raced to the hospital to help his colleagues.

"As you can see, this was an entire team effort on the part of the whole hospital," said Errol C. Schneer, hospital vice president. "Throughout this tragic incident, the hospital operated at optimal levels."

The morning presentation to obstetrics included instructions on how to operate through an emergency and a recommendation of a practice drill.

"When the first Code Silver came, we thought, 'Ah, here comes the drills.' Obviously it was no drill," Mikhail said. But even the presentation couldn't have prepared them for the rampage that followed, which included Bello setting himself on fire.

"The hospital personal instinct is to go save," said Dr. Sridhar Chilimuri. "They really can't run away when one of their colleagues is bleeding. So they stayed. They packed the wounds. And it was actually the NYPD who had to physically extract them out. They wouldn't leave."

The six others who were injured — one patient, two medical students and three physicians — largely suffered gunshot wounds to the head, chest and abdomen.

Dr. Oluwafunmike Ojewoye, a second-year resident, was released after she was shot in the neck, the bullet missing major arteries.

Tariq was undergoing a second wrist surgery, but doctors were confident they saved his hand. One of the medical students was about to be discharged and would return home to Ohio, Chilimuri said. The others were in stable condition.

The baby with the bowel obstruction is still hospitalized, Mikhail said.

Bello blamed his colleagues for forcing him to resign. He sent an email to the New York Daily News just two hours before the rampage.

"This hospital terminated my road to a licensure to practice medicine," the email said. "First, I was told it was because I always kept to myself. Then it was because of an altercation with a nurse."

He also blamed a doctor for blocking his chances at practicing medicine. Bello had warned his former colleagues when he was forced out in 2015 that he would return someday to kill them. But the doctor he was looking for wasn't there at the time of the shooting, officials said. Dr. Tam wasn't supposed to be there that day — she was filling in for a different colleague.