LOS ANGELES — The mayor of Los Angeles on Wednesday told everyone in the nation’s second-largest city to start wearing masks to combat the coronavirus, but California’s governor isn’t ready to take that idea statewide.

Gov. Gavin Newsom said Wednesday he’s focused instead on keeping people inside. He also announced the state may need 66,000 additional hospital beds, 16,000 more than previously forecast, to handle the crush of illnesses expected during the second part of May.

At an afternoon news conference, Mayor Eric Garcetti said he had been awaiting advice from the U.S. Centers for Disease Control and Prevention on mask-wearing but with the COVID-19 rate surging had decided to wait no longer.

The mayor said all 4 million residents who are performing essential tasks such as food shopping should wear homemade, non-medical face coverings, or even bandannas, as people in other COVID-19-struck countries have done.

“To be clear, you should still stay at home. This isn’t an excuse to suddenly all go out,” Garcetti said.

He also said people shouldn’t use medical-grade masks, which are in short supply and are needed by health care workers and first responders.

The mayor said even a “tucked-in bandanna” could slow the spread of the virus and the masks also are good for reminding people to keep their distance.

“I know it will look surreal,” he said, donning a mask. “We’re going to have to get used to seeing each other like this ... This will be the look.”

Los Angeles County reported more than 500 new cases on Wednesday, a 17% hike over the previous day.

Garcetti’s announcement came after Riverside County public health officer Dr. Cameron Kaiser urged that people who need to go out in public should use something — even bandanas or neck warmers — to cover their mouths and noses to protect others and themselves.

The governor had been expected to release guidelines for masks, but at his own news conference Newsom said he did not think they should be a substitute for keeping a safe distance from other people and taking additional measures to prevent the spread of the virus.

“They are not a substitute for a stay-at-home order. They are not a call to get folks to find N95 masks or surgical masks and pull them away or compete against our first responders,” Newsom said.

Newsom focused instead on adding thousands more hospital beds than previously stated. He now projects needing 66,000 more hospital beds for the anticipated peak of cases in late May — 16,000 more than his prior projections.

In Riverside County, Kaiser said the virus is transmitted in droplets that can be spread through coughs or sneezes, so some type of covering could help even if it’s not a hospital-grade mask.

Kaiser issued the recommendation because the state’s fourth-largest county was seeing infections rise faster than predicted. At the current rate, he said Wednesday that it would run out of hospital beds April 12 and ventilators by April 26.

“When the situation changes, the rule book changes,” Kaiser said in a news release. “We’re seeing our numbers increasing even sooner than we predicted, and that means our strategy must change too.”

U.S. and global health authorities have said people who are not health care workers shouldn’t wear a mask unless they’re sick — to prevent infecting others.

The World Health Organization recommended people caring for a sick relative wear a mask. The Centers for Disease Control and Prevention agreed — as long as the person who was ill was not able to wear a mask.

But there has been some conflicting direction. Austria said this week it would require masks for grocery shoppers. President Donald Trump suggested people who are worried should wear a scarf.

California’s public health officer, Dr. Sonia Angell, said face coverings could prevent the spread of the virus, but if worn incorrectly or handled improperly could lead to infection. They could also lead people to let down their guard and not stay the recommended distance of 6 feet (1.8 meters) away from others.

“When we speak about the potential downfalls, which we also must acknowledge, they can be that if people have these masks on, they feel somewhat immune, they feel like they can get closer to other people,” Angell said.

The spread of the virus statewide has, so far, been slow enough to give the state time to prepare for an expected spike in cases that could overwhelm hospitals if extreme measures aren’t taken to keep most people home and away from others.

The state had more than 9,300 virus cases and 199 deaths reported Wednesday, according to Johns Hopkins University, which is keeping a global tally.

For most people, the coronavirus causes mild or moderate symptoms, such as fever and cough, that clear up in two to three weeks. For some, especially older adults and people with existing health problems, it can cause more severe illness, including pneumonia and death.

Newsom has been talking in the past week about increasing hospital beds in the state by two-thirds to add 50,000 new beds at locations that could include convention centers and arenas to cope with peak demand next month. On Wednesday, he increased that number.

“Modeling shows we’ll need roughly 66,000 beds towards the end of May,” Dr. Mark Ghaly, secretary of the state Department of Health and Human Services, said at a news conference with the governor.

Newsom had bad news for parents Wednesday when he said schools should plan to teach from afar for the rest of the academic year.

State Superintendent of Public Instruction Tony Thurmond provided similar guidance to districts Tuesday evening. The decision on whether students will return to the classroom will ultimately be up to school districts.