LOS ANGELES — A Southern California nursing home has been hit hard by the coronavirus, with more than 50 residents infected — a troubling development amid cautious optimism that cases in the state may peak more slowly than expected.

Cedar Mountain Post Acute Rehabilitation in Yucaipa has been told to assume that all of its patients have the COVID-19 virus, San Bernardino County Department of Public Health Director Trudy Raymundo said. As of Tuesday, 51 residents and six staff members had tested positive. Two patients have died, including an 82-year-old woman who had existing health problems.

The nursing home east of Los Angeles isn't accepting new residents and the facility has been closed to visitors under Gov. Gavin Newsom's two-week-old stay-at-home order, Raymundo said.

CORONAVIRUS OUTBREAK AT MASSACHUSETTS VETERANS' HOME KILLS AT LEAST 6, ADDITIONAL TESTS PENDING

The announcement came as Newsom said extraordinary efforts to keep people home have bought the time needed to prepare for an expected peak surge of coronavirus cases in coming weeks.

Newsom said the slower-than-forecast increase in cases means the peak is now likely to occur in May, though he was reluctant to say whether that means the impact on the state won't be nearly as dire as initially feared.

Two weeks ago, Newsom said more than half the state's 40 million people could be infected under a worst-case scenario.

“To be truthful and candid, the current modeling is on the lower end of our projection as I talk to you today,” Newsom said Tuesday. “Very easily tomorrow I could say something differently, and that's why one just has to be very cautious about this.”

Under Newsom's direction, the state has been scrambling to add 50,000 hospital beds to its current 75,000 to ensure enough space for all potential patients during a peak.

On Tuesday, there were more than 8,200 cases and at least 173 deaths reported in California, according to data kept by Johns Hopkins University. Michigan, which has 30 million fewer residents, had about 7,600 cases and at least 259 deaths.

Health officials have warned that as testing ramps up, the number of cases will grow, in some instances very quickly.

Many have credited the state’s early action to issue stay-at-home orders — first in the San Francisco Bay Area two weeks ago and then a few days later in Los Angeles and the rest of the state — with successfully slowing the rise of cases.

Many retail businesses and social venues such as theme parks are closed, restaurants are only offering take out or delivery, and most school campuses have been closed for weeks.

On Tuesday, San Francisco and six surrounding counties extended shelter-in-place orders until May 3 and added new restrictions, including closing playgrounds, dog parks, public picnic areas, golf courses, tennis and basketball courts, pools, and rock-climbing walls.

Also on Tuesday, State Superintendent of Public Instruction Tony Thurmond warned that he expects schools to remain closed into summer and suggested that districts plan to provide other forms of learning for the rest of the academic year.

Millions of youngsters are getting “distance learning” through online teaching or other methods, such as watching special public broadcasting programs. However, the Los Angeles Unified School District hasn’t reached all its 600,000 students.

Some 15,000 high schoolers haven’t taken part in any online learning and another 26,000 who are participating haven’t checked in on a daily basis since campuses closed on March 16, Superintendent Austin Beutner said Monday.

While social distancing precautions seem to be generally obeyed by California’s population, there are concerns that the virus will rampage through enclosed, crowded facilities such as nursing homes and prisons, and among the state’s estimated 150,000 homeless people, who are hard to test or quarantine.

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.

The U.S. Centers for Disease Control and Prevention has said that nursing home populations are at the highest risk of being affected by COVID-19 given the “congregate nature" of the facilities and the fact that many residents have chronic medical conditions.

Eight residents of a New Jersey nursing home have died and all 94 residents of another New Jersey home were moved to another facility after two dozen tested positive for the coronavirus. In Washington state, some 35 residents of a single home near Seattle have died.

U.S. Rep. Paul Cook, who represents the area that includes Yucaipa, said he and others had told themselves: “'God almighty, I hope that it never breaks out in a convalescent home,' and this is what has happened.”

CLICK HERE FOR COMPLETE CORONAVIRUS COVERAGE

“It could be serious today and even worse tomorrow if we don't do our jobs," he said. “We've got to make sure that this does not spread."

Dr. Deborah Birx, coordinator of the White House coronavirus task force, said actions by California and Washington state to close schools, encourage people to work from home and only go out for essential needs had given her hope the virus could be controlled through social distancing measures.

Birx spoke Tuesday as grim new projections of 100,000 to 240,000 deaths nationwide were announced and President Donald Trump called on Americans to heed his safety guidelines, which are weaker than those in place in California and several other states.

Ronayne reported from Sacramento. Associated Press reporters Cuneyt Dil and Don Thompson in Sacramento, Olga R. Rodriguez in San Francisco and Christopher Weber in Los Angeles contributed to this story.