As the water rose around Memorial Medical Center, the main generator ran out of fuel. In the darkened corridors, jammed with fearful strangers, the temperature soared. Medical supplies dwindled, even IVs were rationed. Looters rampaged outside. Inside, the staff broke through windows and fanned elderly patients, trying to keep them cool. The weakest began to die.

The owners of Memorial Medical, one of the city's premier hospitals, were desperately arranging an evacuation, after realizing no help would come from the government. Some patients were loaded aboard boats that took them across the floodwater. Helicopters hired in Dallas raced to New Orleans as staff members carried patients in their arms up two flights of stairs to the roof of an adjacent parking garage to be airlifted out.

Finally, with the city below them still flooded and in chaos four days after the storm, doctors William Casey, John Walsh and the head of the hospital, Rene Goux, climbed aboard the helicopters. "We scoured the institution to make sure no one was left behind," Casey said.

But the revelation Monday that 45 bodies had been recovered from the hospital renewed questions of why the city had failed to evacuate its neediest residents in time, and why the hospital was not adequately prepared to sustain itself until help arrived.

The bodies were of those who died during the ordeal, who were wrapped in sheets, given last rites and laid out in the chapel, hospital officials said. Walsh and Casey acknowledge that the traumatic circumstances leading to the evacuation undoubtedly contributed to the deaths of some of the most frail.

"This was such a massive catastrophe. I don't know that anything could have been done differently," Walsh, the hospital's chief of general surgery, said. "We had a lot of heroic people."

Nearly two dozen hospitals in New Orleans were evacuated in the chaos of Hurricane Katrina. Bodies have been recovered from at least two nursing homes. Security crumbled at several institutions, as thieves tried to steal drugs and assaults occurred inside the facilities. Goux, the last to leave, said "it was basically a war zone."

A nurse who had been at Memorial Medical Center told reporters Tuesday outside the closed building, now protected by the National Guard, that "it was hell." Two other physicians described a grim, deteriorating scene inside the hospital, cut off from the outside by waters that rose quickly.

Officials of the Tenet Hospital Corp., based in Dallas, said they had expected help from the authorities if the facility had to be evacuated. But after Katrina blew past New Orleans on Aug. 29, they did not think evacuation was necessary. The hospital had survived the fierce winds largely intact. It was on emergency power, but by Tuesday morning the grounds were dry and officials expected the city's power would return.

"Our hospitals were well supplied in preparation for hurricanes. We knew they had water and diesel fuel topping off the fuel tanks for their generators," company spokesman Steven L. Campanini said.

Instead, hospital officials received word a levee was broken. By Tuesday afternoon, the hospital was surrounded by water. Tenet officials in Dallas lost contact with the hospital. At 9 a.m. Wednesday, they got a disturbing call from Louisiana state emergency officials saying that the company was on its own to get its people -- and the patients -- out.

Inside the hospital Tuesday night, the main generator ran out of fuel. A few smaller generators were still working. But the temperature in the sealed building soared to well above 100 degrees.

The 240 patients who Casey said were in the hospital included about 80 elderly, long-term-care patients under the care of a separate company, LifeCare Holdings. They bore the brunt of the stress.

"We had teenage boys and girls fanning patients and rubbing them down with cool water," Goux said. "We had this large ward of patients with nurses going from patient to patient and doctors going from patient to patient, doing heroic things to make them as comfortable as possible."

Walsh said that from the upper floors of the hospital "you could see all the catastrophe in the city. You could see people floating, swimming, trying to save their lives."

Walsh and Casey, who is chairman of the anesthesiology department, said patients on artificial respiration were kept alive by nurses who ventilated them by hand. They were the first to be airlifted.

As people made their way to the hospital for refuge, they joined the families of staff and patients, swelling the number inside to about 2,000, Campanini said.

"We had some people trying to enter the hospital. We had gunshots and explosions at night," Goux said. "We sporadically had someone from the National Guard, but they didn't stay long and didn't have any weapons anyway. We tried to set up a perimeter to protect ourselves."

As the helicopters arrived from Dallas, staff members wheeled patients as close as they could to the helipad, then carried them the two flights of stairs outside to load them.

"The nurses and doctors were trying their best under a bad situation. But there were people on stretchers, people who were helpless, waiting in the hallway. They didn't seem to know where to take people," said Nyla Houston, who had just had a baby by Caesarean section Saturday.

Her baby, in intensive care, was airlifted out, but she waited on the rooftop all day Wednesday. Finally, the hospital loaded her and others on a boat, and deposited them on higher ground, promising buses would meet them. None did.

"The hospital should have taken the sickest patients out even before the storm hit," said Houston, who went through a harrowing ordeal to walk out of New Orleans and eventually find her baby. "When they heard the hurricane was coming, they should have evacuated Friday, or Saturday before."

Casey said those who had died "were handled in a dignified manner." With no cooling left in the morgue, they were wrapped in sheets and laid out in the chapel.

The last patients were evacuated by 6:36 p.m. Thursday, Goux said. He and about 72 others who remained behind spent one final night on the helipad. "We stayed up there all night," he said. "We could hear more gunfire down below."

Walsh and Casey were among the last to leave with him.

"I know there are a lot of people who have to stand and answer for what happened" after the storm, Walsh said. "But I don't think there was anything to blame anyone for. It was just such a huge catastrophe."

Stein reported from Washington. Research editor Lucy Shackelford and researcher Madonna Lebling contributed to this report.

Hospital officials wheeled the bodies of those who died in Hurricane Katrina and its aftermath to the hospital's chapel. Texas National Guard Staff Sgt. David Chagoya patrols Memorial Medical Center in New Orleans, where 45 bodies were found.