Through the broken windows, the pulse of helicopter rotors and boat propellers set the summer morning air throbbing with the promise of rescue. Floodwaters unleashed by hurricane Katrina had marooned hundreds of people at Memorial hospital, where they had now spent four days. Doctors and nurses milled in the foul-smelling second-floor lobby. Since the storm, they had barely slept, surviving on catnaps and bottled water. Before them lay a dozen or so mostly elderly patients on soiled, sweat-soaked stretchers. Now staff and volunteers hunched over the infirm, dispensing sips of water and fanning them with bits of cardboard.

The languishing patients were receiving little medical care, and their skin felt hot to the touch. Some had blood pressures so low, their pulses weren't palpable, their breathing the only evidence of life. Hand-scrawled evacuation priority tags were taped to their gowns or beds. They indicated that doctors had decided these sickest individuals in the hospital were to be evacuated last.

For certain New Orleanians, Memorial Medical Centre had always been the place to ride out hurricanes. For nearly 80 years, the steel-and-concrete hospital, armoured in reddish-brown tapestry brick, blazoned with grey stone and towering over the neighbourhood, had defended those inside it against every capricious punch the Gulf's weather systems had thrown. Memorial served a diverse clientele, a short drive from the genteel mansions of Uptown and half a mile from a public housing project. It also housed a "hospital within a hospital", LifeCare, which provided long-term treatment to very sick, often elderly patients. Many were dependent on mechanical ventilators and underwent rehabilitation with the goal of breathing on their own and returning home or to nursing facilities: LifeCare was not a hospice.

As Katrina approached, there were 183 patients at Memorial and 55 at LifeCare. Around 600 staff members had arrived to provide care, along with hundreds of family members and companions, bringing the census in the medical centre to about 2,000. After the levees failed and floodwaters rose, hospital staff had battled to get patients and family members out. Helicopters from the Coast Guard and private ambulance companies had landed on the long-unused helipad on top of an eight-floor parking garage next to the hospital. It took about 45 minutes to get each patient to the helipad. Pilots were impatient – thousands of people needed help across the city. The government's rescue efforts and communications were in chaos.

The hospital was stifling, its walls sweating. Water had stopped flowing from taps, toilets were backed up and the stench of sewage mixed with the odour of hundreds of unwashed bodies. Corridors were enveloped in darkness penetrated only by dancing torch beams. Without working phones, televisions, computers and overhead pagers, information was scarce. Critical messages passed voice to voice up and down the staircases.

Among the remaining patients was a divorced mother of four with a failing liver who was engaged to be remarried; a second world war "Rosie Riveter" who had trouble speaking because of a stroke; and Ma'Dear, an ailing matriarch with long, braided hair, renowned for her cooking and the strict but loving way she raised 12 children.

Early on the Thursday afternoon, a doctor, John Thiele, stood regarding them. He had taken responsibility for a unit of 24 patients after Katrina had struck on the Monday, but by now the last of them were gone, presumably on their way to safety. Two had died before they were rescued, and their bodies lay a few steps down the hall in the hospital chapel, now a makeshift morgue.

Thiele specialised in critical care and diseases of the lungs. A stocky man with a round face and belly, and skinny legs revealed beneath his shorts, he answered to Dr T or, among friends, Johnny, and when he smiled, his eyes crinkled nearly shut. He had undergone part of his training at Charity hospital, one of the US's busiest trauma centres, where he had learned to attend to the most critical patients first. It was strange to see the sickest here prioritised last for rescue. At a meeting Thiele had not attended, a small group of doctors had made this decision without consulting patients or their families, hoping to ensure that those with a greater chance of long-term survival were saved. In all his years of practice, Thiele had not trained for the simultaneous loss of backup power, running water and transportation.

He had arrived at Memorial on Sunday, with a friend who was recovering from pneumonia and too weak to comply with the mayor's mandatory evacuation order for the city, which had exempted hospitals. Early on Monday, Thiele had awoken to shouts and felt his fourth-storey corner office swaying. Its floor-to-ceiling windows moved in and out with the wind, letting in the rain.

A nurse gives one patient water as hospital staff carry others up three flights to the helipad. Photograph: Brad Loper/Dallas Morning News/Corbis

The hurricane cut off the city's power. The hospital's backup generators did not support air-conditioning and the temperature climbed. On Tuesday morning, the floodwaters rose and administrators decided to evacuate. It was dark when the last of the Memorial patients who had been chosen for immediate transport were finally gone. Later that night, the Coast Guard offered to evacuate LifeCare patients on ventilators, but the offer was declined. The helipad had minimal lighting and no guardrail, and staff were exhausted. Memorial had shaved its patient census to about 130. All 55 LifeCare patients remained.

Early on Wednesday morning, Memorial's generators failed, throwing the hospital into darkness and cutting off power to the machines that supported patients' lives. Volunteers helped heft patients to staging areas for rescue, but helicopters arrived irregularly. That afternoon, Thiele sat on the emergency room ramp for a cigar break with a colleague who told him that doctors were being asked to leave last. According to Thiele, the other doctor brought an index finger to the crook of his opposite elbow and pantomimed giving an injection. Thiele caught his drift and said, "Man, I hope we don't come to that."

Thiele's colleague later denied he ever made the gesture, and said he spent nearly all his time outside the building loading hundreds of mostly able-bodied evacuees (patients, family members and staff) on to boats that floated them over a dozen blocks of flooded streets to where they could wade to dry ground. It wasn't clear what happened to them once they made it there.

On Wednesday night, Thiele heard gunshots outside the hospital. He was sure people were trying to kill each other and that the hospital would be overtaken, with those inside having no good way to defend themselves against what he later called "the animals", the hospital's mostly low-income African-American neighbours. He lost his footing in an inky stairwell and nearly fell down the concrete steps. Panicked and convinced he would die, he called his family to say goodbye.

He felt abandoned. You pay your taxes, he thought, and you assume the government will take care of you in a disaster. He wondered why Tenet, the giant Texas-based hospital chain that owned Memorial, had not yet sent any means of rescue.

Finally, on Thursday morning, the company dispatched leased helicopters, while other aircraft from the Coast Guard, air force and navy hovered overhead, awaiting a turn on the helipad. Boats came and went, with an ear-splitting drone.

At first, the pilots would not allow pets on board, creating a predicament for staff members who had brought them to the hospital for the storm. A young internist held a Siamese cat as Thiele felt for its breastbone and ribs, and conjured up the anatomy he'd learned in a college dissection class. He aimed the syringe full of potassium chloride at the cat's heart. The animal wriggled free of his hands and swiped and tore Thiele's sweat-soaked scrub shirt. Its whitish fur stuck to him. They caught the animal and tried again to euthanise it, working in a hallway perhaps 20ft from the patients in the second-floor lobby. It was craziness.

A patient waits to be evacuated from the devastated hospital. Photograph: Brad Loper/Dallas Morning News/Corbis

Thiele knew nothing about the dozen or so patients who remained in the second-floor lobby, but they made an impression on him. Before the storm, they would have had a chance. Now, with the compounding effects of days in the inferno, with little or no medication or fluids, they had deteriorated. Thiele didn't see any medical records. He didn't feel he needed them to tell him that these patients were moribund. He watched a doctor he didn't know, a short woman with auburn hair, direct their care. He'd later learn her name: Dr Anna Pou, a head and neck surgeon. She looked to Thiele like a female Lone Ranger. After enduring four stressful days and nights of little sleep, she retained the strength and determination to tend to the worst-off patients.

Coming from a big family, Pou knew how to get along with people, but her respect for hierarchy had its limits. When she was passionate about something, whether or not she was right, she stated her beliefs unequivocally. Later, Thiele would say he heard her saying that these patients would not be moved from the hospital. He said he did not know if that was her decision, or if she had been told that by an administrator.

A day earlier, Pou – always one to take on the most difficult tasks – had jumped in to help co-ordinate the mass movement of patients from their rooms to staging areas near the hospital's exits. Nurses had opened each chart and read the diagnoses, using torches sparingly to save batteries. Pou and the nurses had assigned a category to each patient. A nurse wrote 1, 2 or 3 on a sheet of paper and taped it to the clothing on a patient's chest. Other patients had numbers written on their hospital gowns. Many of the 1s – roughly three dozen from Memorial and LifeCare – were guided down to the emergency room ramp to depart by boat. The 2s – perhaps 70 in all throughout the day – were generally placed along the corridor on the way to a hole in the machine room wall that was a short cut to the helipad. Eighteen or so 3s were moved to a corner of the second-floor lobby. Patients awaiting evacuation were still cared for – their incontinence pads were changed, they were fanned and given sips of water if they could drink – but once the patients were moved out of their rooms on Wednesday, most other medical interventions were limited.

On Thursday morning, hospital CEO L René Goux told Thiele that everyone had to be out by nightfall. It was now early afternoon. A nursing director, Susan Mulderick, the designated disaster manager, had given Thiele the same message. The two leaders later said they had meant to focus their exhausted colleagues on the evacuation, but the comments left Thiele wondering what would become of these patients when everyone else left.

What would a patient's relative want Thiele to do? There was no one left to ask; they had all been made to leave, told their loved ones were on their way to rescue.

The first thing, Thiele – a Catholic – thought, was the golden rule: do unto others as you would have them do unto you. He also adopted a motto he had learned in medical school: heal frequently, cure sometimes, comfort always. Robbed of almost any control of the situation except the ability to offer comfort, it seemed obvious what he had to do.

The nurses had brought syringes and morphine to this makeshift unit in the second-floor lobby. An intensive care nurse he had known for years, Cheri Landry, the Queen of the Night Shift – a short, broad-faced woman of Cajun extraction who had been born at the hospital – had, Thiele believed, brought medication down from the ICU. He thought he knew why they were here. He later said he believed they were hastening the end for these patients. He agreed with what was happening. Others involved, including Pou, later claimed they were only trying to make patients more comfortable and strongly rejected any suggestion they intended to bring about death. The young internist who had helped him euthanise the cat refused to take part.

In the days since the storm, New Orleans had become an irrational environment. It seemed to Thiele that the laws of man and the normal standards of medicine no longer applied. He had no time to provide what he considered appropriate end-of-life care. He accepted the premise that the patients could not be moved and the staff had to go. He could not justify hanging a morphine drip and praying it didn't run out after everyone had left and before the patient died, following an interval of acute suffering. He could rationalise what he was about to do, but he knew it was technically a crime. It didn't occur to him then to stay with the patients until they died naturally. That would have meant, he later said he believed, risking his life.

He offered assistance to Pou, who at first refused it. "I want to be here," he insisted, and stayed.

Hundreds of evacuees were taken by boat across a dozen blocks of flooded streets to dry land. Photograph: Bill Haber/AP

With some of the doctors and nurses who remained, Thiele discussed what the doses should be. To his mind, they needed to inject enough medicine to ensure the patients died before everyone else left the hospital. He would push 10mg of morphine and 5mg of the fast-acting sedative drug midazolam, and go up from there as needed. Midazolam carried a "black box" warning from the FDA, the most serious type, stating that the drug could cause breathing to cease and should be given only in settings where patients were monitored and their doctors were prepared to resuscitate them. That was not the case here. Most of these patients had Do Not Resuscitate orders.

It took time to mix the drugs, start IVs and prepare the syringes. Thiele looked at the patients. They seemed lifeless apart from their breathing – some hyperventilating, some gasping irregularly. Not one spoke. He took charge of four of them lined up on the side of the lobby closest to the windows: three elderly white women and a heavy-set black man. It had come to this. His mind began to form a question, perhaps in the faint awareness that there might be alternatives they had not considered. Perhaps he realised at the moment of action that what seemed right didn't feel quite right; that a gulf existed between ending a life in theory and doing so in practice. He turned to the person beside him, the nurse manager of the ICUs who also served as head of the hospital's bioethics committee. Karen Wynn was versed in adjudicating the most difficult questions of treatment at the end of life. She, too, had worked at the hospital for decades. At this most desperate moment, Thiele trusted her with his question.

"Can we do this?" he would later remember asking her. "Do we really have to do this?"

To Wynn, it wasn't a question of could or couldn't. In her opinion, medicating the patients was something they needed to do. She lived in the world of the ICU, where many patients didn't get better. Wynn believed the outcome would be the same with or without the drugs, even if the time frame would likely be different. She later said her only aim was to make patients comfortable by sedating them.

Wynn turned to the elderly white woman with laboured breathing. She diluted what she later remembered was a 10mg vial of morphine and a small amount of midazolam in 10ml of saline. She drew it up in a syringe and pushed it slowly into the woman's IV catheter, then flushed the line with saline. The woman seemed to stop struggling so hard to breathe. She died within half an hour.

One patient seemed to struggle to breathe after receiving an injection. A nurse panicked and searched in vain for someone to do something, write an order to reverse the drugs, inject an antidote. Later, her memory of it would be a blur that left her with the discomfiting sense that, at least in some people's minds, the medicines were being given "for the greater good", to get the exhausted, frightened staff out more quickly, as there were too many patients who were immobile. "This is what needs to be done," one colleague said when she asked what could be done to stop it. Several staff members said that Pou had ordered the drugs, though the nurse had no idea if that were true or what her intentions might have been.

One, Bryant King, an internal medicine specialist, strongly objected when a colleague asked what he thought of ending the patients' suffering. "I disagree 100%," he said. The idea was stupidity itself. The patients had been there only two days since the floodwaters rose; they were dry and had food and water, and were receiving small doses of medicine to treat pain and discomfort. Hastening death was not a doctor's job. The remaining patients were hot and uncomfortable, and a few might be terminally ill, but he didn't think they were in the kind of pain that called for sedation, let alone mercy killing.

As the patients who had been injected died, the medical professionals covered them with sheets and carried them into the chapel.

When a disaster mortuary team finally arrived, more than a week after the last living patients and staff members had departed, they recovered 45 bodies. It was the largest number of bodies found at any Katrina-struck hospital or nursing home.

On a July evening nearly a year later, Dr Anna Pou, wearing rumpled surgical scrubs, answered a knock on her door. Law enforcement agents told her she was being arrested, and drove her to Orleans Parish prison. It shocked her to read "principal to second degree murder 4 counts" on the booking form. She was quickly released on bond.

Hours later, Louisiana's chief law enforcement official, attorney general Charles Foti, walked to a podium and announced the arrests of Pou and two Memorial nurses, Cheri Landry and Lori Budo. At least four LifeCare patients, he alleged, "were killed by lethal injection". "We feel that they abused their rights as medical professionals," he said of the three arrested women. "We're talking about people that pretended that maybe they were God." When a reporter mentioned the word "euthanasia", Foti stopped her short. "This is not euthanasia. This is plain-and-simple homicide," he said, noting that it was subject to being proved in court. "I would probably say there will be more arrests," he added.

After that, whenever Dr John Thiele's doorbell rang, he seized up with the thought that he, too, would be going to jail. Thiele began losing weight. In February 2007, the month after a grand jury was selected to consider whether to indict Pou and the two nurses, Thiele was admitted to hospital with severe abdominal pain. He had advanced, metastatic colon cancer. His surgeon marvelled at how tuned out of himself Thiele had to have been not to notice how sick he was. He attributed it to the stress of the investigation. (Five years after Katrina, Thiele died at his home on 31 December 2010.)

Memorial hospital after Katrina. Photograph: Times-Picayune/Landov/Barcroft Media

Forensic pathologists had been carefully examining the evidence in the Memorial deaths. One morning, they gathered in the office of Orleans Parish coroner Frank Minyard, who was classifying the deaths at the hospital. Twenty-three bodies had tested positive for morphine or midazolam, or both. The laboratory director, Robert Middleberg, had handled thousands of cases in his career, and the drug concentrations found in many of these patients seemed high to him.

Middleberg advised his colleagues to consider each patient's clinical history in conjunction with the lab numbers. The group pored through the available medical records, case by case.

They considered Emmett Everett, a 61-year-old LifeCare patient who had fed himself breakfast on the Thursday morning, and asked his nurses whether they were "ready to rock'n'roll". He weighed 380lb and was partially paralysed. According to witnesses, Pou and other staff members had concluded that he was too heavy to be transported to safety. The two drugs were detected in his remains. Pou's attorney said she was not responsible for his death, which her lawyer attributed to an enlarged heart. Pou said on national television that she was "not a murderer" and gave drugs to some patients for comfort.

Almost every patient who died after the helicopters and boats arrived that Thursday morning tested positive for one or both of the drugs. "Homicide," the forensic experts concluded in nearly every case. Dr James Young, the then-president of the American Academy of Forensic Sciences, was asked to study a subset of the LifeCare deaths. He wrote: "All these patients survived the adverse events of the previous days, and for every patient on a floor to have died in one three-and-a-half-hour period with drug toxicity is beyond coincidence."

Still, coroner Minyard concluded that most of the deaths were of indeterminate cause rather than homicides. He said a trial would not be good for the city and he did not believe that the women had killed intentionally. The local prosecutor dropped charges against the nurses and compelled them to testify at the grand jury investigating Pou. A public relations firm marshalled support for Pou. At a public rally, speakers warned that medical professionals, their ranks already depleted by Katrina, would flee Louisiana in droves if a doctor was indicted after serving in a disaster.

Days after the rally, the grand jury declined to indict Pou for murder. One juror later said that nobody testified to seeing her actually inject a patient. The evidence needed to pin the deaths on her was, in this juror's opinion, lacking. Still, the juror was convinced – and, she believed, all her fellow jurors were too – that a crime had occurred on that fifth day at Memorial.

Pou later campaigned successfully for laws to protect medical workers who serve in disasters. The laws immunise those in Louisiana from most civil lawsuits (though not in cases of wilful misconduct) for their work "in accordance with disaster medicine protocol". Prosecutors are urged to await the findings of a medical panel before deciding whether to pursue criminal charges.

The terrible events at Memorial emphasise the ethical duty to plan for emergencies. When resources run short, choosing whose lives are to be prioritised is as much a question of values as of medicine, and deserves wider consideration. At Charity hospital, a New Orleans public institution where rescue took an additional day, with many more patients than Memorial, flexible thinking helped ensure only a handful died. The sickest were prioritised first. A panel of disaster experts convened by America's Institute of Medicine came down unequivocally on the question of euthanasia during disasters: "Neither the law nor ethics," they wrote, "support the intentional hastening of death, even in a crisis." It is hard for any of us to know how we would act under such terrible pressure. But we, at least, have the luxury to prepare.

• © Sheri Fink, 2014

This is an edited extract from Five Days At Memorial, by Sheri Fink, published by Atlantic Books at £14.99. To order a copy for £11.99, including UK mainland p&p, call 0330 333 6846, or go to theguardian.com/bookshop.