Floodwaters approached Houston's Ben Taub Hospital on Sunday as staff repeatedly revised plans to evauate patients because of flooding from Hurricane Harvey. (Andrew Kragie/AP)

The first ambulances finally arrived at Ben Taub Hospital, in the heart of Houston’s vast Texas Medical Center, to remove five patients clinging to life on ventilators.

The county hospital had initially planned to transfer all of its 350 patients. As the remnants of Hurricane Harvey continued to unleash epic rains, a foot of water was rising in the hospital’s basement from a burst pipe and wet seeping in from the city’s inundated streets. The kitchen was knocked out, as well as the pharmacy and the area where supplies such as linens and needles are stored.

But with knee- to waist-high water immediately outside, and flooding across the city, the hospital-wide evacuation became a new plan to move fewer than 80 of the sickest patients. And then, when only five ambulances could reach the bay outside the emergency department, it was significantly reduced again. In the end, only three vehicles made their destinations of hospitals up to 150 miles away; the two others had to turn back.

Ben Taub was among some 20 of about 110 hospitals in Houston and nearby counties that removed a portion or all of their patients — 1,500 people, including those in nursing homes and other facilities — as floods from Harvey continued Wednesday to ravage Southeast Texas.

Many of the other facilities canceled elective surgeries and any other appointments that could wait.

Volunteer Toby Rannigan came from Dallas to help Houston residents recover from historic floods. (Dalton Bennett,Patrick Martin/The Washington Post)

The storm “challenged every plan we’ve written, every resource, every piece of inventory. I mean, we’ve run out of wheelchairs,” said Darrell Pile, chief executive of the Southeast Texas Regional Advisory Council, who oversees preparations for and management of medical crises for the 25-county region. “I mean it just was unimaginable.”

At Memorial Hermann Sugar Land Hospital just southwest of Houston, chief executive Greg Haralson said administrators watched as the Brazos River less than a mile away quickly rose. With the river forecast to crest Thursday at 59 feet — just an inch shy of a nearby levee’s capacity — officials turned to their disaster plan and called for evacuation.

“We felt in our guts this was the right thing to do. It was a very tough decision,” Haralson said. Between 2 p.m. and 9 p.m. Tuesday, in driving rains, about two dozen ambulances carried 75 patients to another Memorial Hermann hospital a dozen miles away.

MD Anderson Cancer Center, one of the nation’s premier cancer hospitals and a major presence in the Texas Medical Center, shut down its massive outpatient operation on Sunday to focus its diminished resources on patients already in the hospital with the most time-sensitive need for treatment.

Doctors, nurses and other staff members there spent the next few days calling patients and medical facilities nationwide to reschedule appointments and arrange for people whose cancers require immediate treatment to receive it at hospitals closer to home. Officials say the hospital’s outpatient clinics, which draw 1.4 million patients each year from across the nation and overseas, will not reopen until at least Friday.

Disruptive as such changes have been, doctors, health-care administrators, and the leaders of the regional network say Houston’s vaunted web of hospitals has generally come through the storm in far better condition than during the last massive rains to deliver a direct hit.

Sixteen years ago, during Tropical Storm Allison, “virtually every hospital was broken in one way or another,” recalled Kenneth Mattox, chief of staff and chief of trauma at Ben Taub Hospital. Memorial Hermann, for one, had no power because its basement-level generator had been flooded, and staff members were working by flashlight and ventilating patients by hand.

Evacuees at Houston's NRG Stadium describe the few items that they were able to save from their flooded homes. (Zoeann Murphy,Jorge Ribas,Monica Akhtar/The Washington Post)

The pills in hospital pharmacies were wet and ruined. Medical equipment shorted out. The medical center’s research laboratories suffered $2 million in losses.

Mattox and another Houston trauma surgeon went on local televisions stations a few weeks after the June storm and said: “Drink milk, not booze, on this Fourth of July weekend, because if you get into a wreck or get in a fight, we have no way to take care of you.”

In the aftermath, a coalition of hospitals, emergency medical services, fire departments and community leaders undertook intensive efforts to fortify the city’s medical system. This led to such physical changes in the sprawling medical center as submarine doors that can be closed to wall off parts of a tunnel system that runs beneath the blocks-long area. Outside berms were built for protection should a gully off Brays Bayou overflow its banks, and strategically located flood gates that can rise three feet were installed. Hospitals that had emergency electricity generators in the basement moved them higher.

Such fortifications were tested as never before in recent days.

Based on protocols written over the intervening years, hospitals stationed extra staff members in their facilities so stranded workers could rotate in shifts. Other systems lessened the risk of running out of crucial supplies.

And unlike after Hurricane Katrina, in which no one knew where some New Orleans patients had been moved and some arrived at distant hospitals without medical records, a regional Catastrophic Medical Operations Center coordinated transfers and kept track of which hospitals had beds available for specific types of care.

Since Allison, Houston has been inundated by brushes from hurricanes Rita in 2005 and Ike three years later. But nothing like Harvey.

Yet when William McKeon, the Texas Medical Center’s president, looked outside during the height of the storm, “We saw the water flowing and the streets looking like rivers when the bayou crested, but the lights were all on,” he said. “The people were inside, were caring for patients as they do every day.”

Doctors at MD Anderson said because of special doors that now exist, the lobby had some flooding but areas for patient care weren’t affected.

Inside the hospital, much of the attention focused on patients with blood cancers, whose treatments are urgent, said Christopher Logothetis, chairman of genitourinary medical oncology. Leukemia patients who have undergone a bone-marrow transplant, for instance, are temporarily dependent on blood transfusions for blood cells and platelets. In those cases, “cancer doesn’t wait,” said lymphoma expert Jason Westin.

By Wednesday morning, with the storm lifted, ambulances drove once again over clear roads, workers in medical scrubs bicycled on dry sidewalks, and the gates of some parking garages stood open as cars filled them.

“Free!” a man shouted.

As waters recede in some places, medical emergencies from the storm and its cleanup will multiply, doctors and hospital officials know.

And following its protocol, Pile said, the Catastrophic Medical Operations Center will conduct an after-study to compile evidence of how hospitals weathered the storm. On the agenda, he said, will be Ben Taub’s shifting decisions about evacuating — from the all-hospital plan to calling off the whole idea after just three critically ill patients were moved.

Carolyn Y. Johnson in Washington and Avi Selk in Houston contributed to this report.