Across the Bay Area, local governments are racing to conscript public buildings and spaces into the fight against the coronavirus, as health experts brace for a surge of new patients over the next two weeks.

In San Francisco, city officials have made clear that any publicly owned space is fair game for the city’s coronavirus response.

“Nothing is off the table,” Mayor London Breed said at a news conference Friday. “We need to prepare for any situation, including concerns around where hospital beds might go and how we can address this challenge as it rises.”

There’s a similar outlook around the Bay Area — the city of Santa Clara is transforming its convention center into a temporary hospital, while Alameda and Contra Costa counties are looking at using public buildings as medical facilities.

In San Francisco on Wednesday, Breed and public health director Dr. Grant Colfax presented a stark scenario: If the city fails to “flatten the curve” — limit new COVID-19 cases to prevent hospitals from being overwhelmed with patients — it will need up to 5,000 additional hospital beds, 1,500 ventilators and many more health care workers.

City leaders and health experts hope that forecast remains a worst-case outlook and that the shelter-in-place mandates issued across the region will stem the tide of new cases and avert an overwhelming inundation of hospitals like what is taking place in New York City.

Mary Ellen Carroll, executive director of the San Francisco Department of Emergency Management, said the city’s search for public spaces that could be used for “ambulatory care centers” — treatment centers for medical needs not related to the coronavirus — stems from the need to take pressure off the city’s hospitals, in preparation for a surge in new cases. That would allow hospitals to focus on COVID-19 patients, Carroll said.

The city has not settled on specific sites, but workers were out Friday scouting potential locations.

“We’re looking at existing medical facilities, like our public health clinics, that potentially could be used for that,” she said.

Buildings already owned by the city are being repurposed as well.

Starting next week, Breed said, Moscone Center West would be used as a temporary homeless shelter for people who have not been diagnosed with COVID-19. The move will add capacity to the city’s homeless shelters, opening up more space for people living on the streets and increasing the social distance between people in shelters. The space may hold as many as 150 people.

Democratic state Sen. Scott Wiener of San Francisco, one member of the city’s delegation in Sacramento working to secure funding and other resources, said the city had ample room to accommodate its space needs resulting from COVID-19.

“Because San Francisco is a densely populated city, there’s a conception that there’s no space to do anything. That’s not true,” said Wiener. “San Francisco has a lot of large spaces. We have large indoor spaces, like our convention facilities and Bill Graham (Civic Auditorium). We have a lot of plazas and big parking lots by health care facilities, and other spaces where temporary structures can be put up.

“Fifteen percent of our land mass is city parks and plazas. All of these spaces, both inside and outside, need to be on the table,” he said.

Privately owned spaces, particularly hotels, which have emptied out as businesses and leisure travel have largely ceased, are also being increasingly utilized as temporary housing.

So far, the city has reserved them for homeless people and those living in close quarters who don’t need hospitalization but can’t safely self-isolate after a COVID-19 diagnosis. They will also soon be utilized, city officials said, for front-line health care workers and first responders who are exposed to the virus so they don’t risk transmitting it to their families or roommates.

Breed said Friday that San Francisco was finalizing arrangements to rent about 3,000 hotel rooms by next week, 10 times the number the city was leasing a week ago.

The city is not likely to need to use its eminent domain powers to commandeer private space for its COVID-19 response, Carroll said.

“We are having a lot of success working through our partnerships with the private sector, getting hotel rooms and that sort of thing,” she said. “From my perspective, we’re getting what we need.”

San Francisco is also making contingency plans in case it runs out of space at the city morgue. The newly renovated medical examiner’s office currently has enough space, though Carroll said her department was working closely with health officials to work on “morbidity projections” and comparing them to the city’s current morgue space.

“We have a lot more space than we have had historically, but if we see any gaps in that area, we’re working on alternative plans on what we would procure to fill that gap,” she said. As of Friday afternoon, three people had died from COVID-19 in San Francisco, according to the health department.

By far the most visible and active public space already in use for the city’s coronavirus response has been Moscone Center South. Since March 16, the conference center, bereft of conferences or business gatherings, has been transformed into the city’s emergency operations center, the central hub for San Francisco’s response to the pandemic.

About 350 city workers staff the operations center, fielding calls from the public, coordinating resources and numerous other tasks.

In addition to San Francisco, other Bay Area locations are working to transform public spaces into makeshift medical facilities.

The city of Santa Clara is also transforming its convention center into a temporary hospital for up to 250 COVID-19 patients with nonemergency symptoms. The space is stocked with beds and enough medical supplies and medicine for at least three days, officials there said. Santa Clara County is the epicenter of the coronavirus crisis with 574 confirmed cases — more than in any Bay Area county — by Friday.

Alameda County officials are working with the state and federal governments to identify locations for “alternative care sites, mobile field hospital and surge capacity medical facilities,” said Jim Morrissey, the county’s tactical medical program director. No specific locations have been selected yet.

Similarly, San Mateo County officials are working with the state and federal officials on plans for additional care facilities and surge protocols, but declined to give specifics.

Laine Hendricks, a spokeswoman for Marin County, said the county works all year with hospitals and medical facilities to prepare for disaster responses. Using the county’s flu pandemic plan as a baseline, officials are expanding its response to COVID-19 as they learn more about the virus and how it spreads, she said.

Earlier this week, Contra Costa County health officials said that part of Alhambra High School in Martinez could be transformed into a makeshift hospital for COVID-19 patients, because of its proximity to the county’s hospital.

“Both as a district and as a community, we have a legal obligation as well as a moral and ethical obligation, to provide the highest level of cooperation during this time,” the county said in a statement.

Dominic Fracassa and Sarah Ravani are San Francisco Chronicle staff writers. Email: dfracassa@sfchronicle.com, sravani@sfchronicle.com Twitter: @dominicfracassa @SarRavani

Correction: An earlier version of this article incorrectly described comments from Mary Ellen Carroll of the San Francisco Department of Emergency Management on eminent domain. Carroll said the city is not likely to need to use its eminent domain powers to commandeer private space for its COVID-19 response.