Paul Campbell / Getty / The Atlantic

When COVID-19 first started showing up at the UC San Francisco Medical Center in February, the hospital set up triage tents, canceled elective surgeries, and created a whole new ICU in the now-empty surgery-recovery area. But what if all of that isn’t enough? If a surge of coronavirus cases overwhelms the hospital in the coming weeks, the remaining options become more and more drastic: putting beds in a waiting room and then in hallways outside the ER, and then—if necessary—a gymnasium across the street.

“Nobody wants to go there,” Jeanne Noble, an emergency-care physician at UCSF, says. “We will not be providing the level of care we’re all comfortable and used to providing.”

Hospitals all over the country are, like UCSF, preparing for the worst. If social distancing fails to sufficiently slow the spread of the coronavirus, which causes the disease COVID-19, hospitals in the United States could be overburdened, as they were in Wuhan and northern Italy—both of which have more hospital beds per capita than the U.S. “Our hospitals will be stressed in ways they’ve probably never experienced,” says Eric Toner, an emergency physician and senior scholar at the Johns Hopkins Center for Health Security.

In coronavirus hot spots, state and local governments have stepped in with unprecedented efforts to add thousands of hospital beds—all over the country, and all at once. A county in Washington State has leased a motel and erected a tent hospital on a soccer field as part of a push to create 3,000 hospital beds. California is reopening closed hospitals. New York is turning a major convention center in Manhattan into four 250-bed field hospitals. After requests from state leaders, Navy hospital ships that have 1,000 beds each will also deploy to Los Angeles and New York City.

An American hospital today is fairly good at keeping critically ill COVID-19 patients alive—until it runs out of space: Building more hospital beds is crucial to saving lives in the coming weeks and months. But no one alive has ever dealt with a pandemic of this scale. Although the country can draw on experience in responding to natural disasters and world wars, the coronavirus poses an entirely new challenge for modern medicine.

[ Read: The biggest worry for doctors fighting the pandemic ]

In the U.S., hospitals already operate near capacity, meaning they have few free beds even in ordinary times. The first priority will be saving these beds for the most seriously ill coronavirus patients. “I don’t think you can realistically put people who need critical care anyplace outside of the hospital,” Toner says. That means discharging patients who can be discharged, canceling elective surgeries, and finding alternative sites for noncoronavirus patients. The Navy hospital ships, which were designed for trauma wounds rather than infectious diseases, are best suited for this purpose.

Hospitals could also fit two patients into rooms that currently hold one. “Many hospitals have gone from dual occupancy to single occupancy in recent years,” Stephen Cantrill, an emergency physician in Denver, told me. “I can start double-bunking patients.” And as at UCSF, hospitals can convert areas like outpatient clinics, hallways, and classrooms into space for more beds.

The next step would require the government to add beds outside hospitals—such as in hotels, college dormitories, and convention centers. Individual hotel and dorm rooms can make it difficult for health-care workers to monitor the condition of every patient, says Randy Kearns, a professor of health-care management at the University of New Orleans, so they’re usually best suited for patients who have mild cases but need a place to stay because they can’t self-isolate at home. Because of the dire lack of beds for patients who are most critically ill, the U.S. Army Corps of Engineers has made plans to retrofit hotel and dorm rooms into “ICU-like” facilities with a nurse’s station in the hallway. These retrofitted rooms would be “negative pressure,” meaning they allow air in but not out to prevent pathogens from leaving the room.

If the outbreak gets even worse, the U.S. will need to take care of patients that are seriously ill outside the hospital, too. The military, FEMA, and even state emergency responders are experienced in setting up tent hospitals that can provide high levels of care, including surgery, in disasters or mass-casualty events. But they are not set up for a virus that can spread through the air. “In mobile hospitals, very rarely do you have a lot of negative-pressure rooms,” Lew Stringer, a former senior medical adviser to FEMA, says. The facilities are not usually designed with stringent infection-control measures in mind.

Besides the risk of transmission, many coronavirus patients are in hospitals because they need supplemental oxygen, which Toner says could be especially tricky to deliver in a field hospital. Typically, hospitals store their oxygen in tanks, which are connected through the building to patient rooms. The tanks are big. They are potential fire hazards. And they might require yards and yards of tubing to connect them to patients who need oxygen. Building modern field hospitals for a highly contagious disease is “not something that’s ever been done before,” Toner says. “We’ll have to figure it out.” These field hospitals will also need more of all the standard equipment: beds, IV lines, and personal protective gear for hospital staff.

[ Read: We’re failing our doctors ]

But regardless of where the beds end up, there may not be enough health-care workers to take care of the patients in them. “The question is how would we staff all these areas,” Noble says. The hospital is figuring out how to train doctors who don’t usually work in emergency care—for example, surgeons whose elective procedures were canceled. State and local authorities are also asking recently retired health-care workers to come back to work, but that’s a tough ask, because older people are also the most at-risk for COVID-19.

If things get really bad—if seriously sick patients are put in field hospitals and staff are stretched thin—care in the middle of a pandemic will suffer as a result. Health-care workers will have to conserve protective equipment for themselves and save ventilators for patients most likely to recover.

A decade ago, Cantrill was on a national committee that created the guidelines for hospitals trying to make it through a crisis. They debated, in the abstract, about how to ration scarce resources that could mean the difference between life and death. Now, for the first time in his career, those guidelines are about to get real. “You’d hoped it never gets here,” he told me, “but I think that’s where we are.”

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.