California has extended its shelter-in-place order to cover the entire state, Governor Gavin Newsom announced on Thursday, in a dramatic escalation of efforts to battle the coronavirus outbreak.

The order, which will go into force on Thursday evening, requires the state’s nearly 40 million residents to remain indoors and limit outdoor movement to what is “absolutely essential”.

The move came as Newsom on Thursday estimated that 25.5 million people – roughly 56% of California’s population – were likely to become infected with the coronavirus, an alarming projection offered by the governor in a letter to Donald Trump. Newsom called on the president to deploy a navy hospital ship, the USNS Mercy, and station it in the port of Los Angeles to help the giant metro area deal with a fast-moving health crisis.

“In the last 24 hours, we had 126 new Covid-19 cases, a 21% increase. In some parts of our state, the case rate is doubling every four days,” Newsom wrote. He added that evidence of community transmission had been found in at least 23 counties.

“We project that roughly 56% of our population – 25.5 million people – will be infected with the virus over an eight-week period,” he said.

At a press conference on Thursday evening, Newsom acknowledged the severity of the order and urged Californians to band together. “This is not a permanent state, this is a moment in time,” he said.

The nations biggest economy is closed. https://t.co/md9ip9F53H — Richie Nakano (@linecook) March 20, 2020

At the press conference, Newsom also reiterated the alarming projection that roughly 56% of the state’s population could become infected. He had previously said that the state might need about 20,000 hospital beds, a shortage he hopes to address by renting two hospitals at each end of the state and docking a navy hospital ship near Los Angeles to help meet demand.

“If we meet this moment, we can truly bend the curve to reduce the need to have to go out and to cobble all those assets together,” he said.

Newsom called on residents to self-isolate. He said: “I don’t believe the people of California need to be told by law enforcement it’s appropriate to home-isolate – go about the essential patterns of life, but do so by socially distancing yourselves from others and using common sense.”

The state expected a hospitalization rate of 20%, which is above the existing capacity of the system, he said.

Earlier on Thursday, Los Angeles ordered residents to stay indoors and limit all outdoor movement beyond what is “absolutely essential”. Workers in healthcare, government and the food industry will be able to travel for work, and grocery stores, pharmacies, hardware stores, gas stations and other essential businesses will remain open. Officials said residents can still go outside, enjoy open space and go on walks.

Thursday’s move echoed steps taken earlier in the week by San Francisco and five Bay Area counties, which on Monday issued a shelter-in-place order closing down non-essential businesses and urging residents not to leave their homes unless necessary. Bars were closed and restaurants became delivery- or takeout-only.

“We need to be painfully honest. We’re about to enter a new way of living in Los Angeles for a period,” said the mayor, Eric Garcetti. “Today is a day that will be seared into the story and the streets of this city.”

The USNS Mercy would provide much-needed hospital beds, a resource Newsom warned this week would become increasingly scarce, as the state looks to add 19,500 new beds to meet projected demand. Experts worry that demand from patients who need treatment for coronavirus could overwhelm available resources and make it more difficult to treat patients who need care for trauma, heart attacks or car accidents.

As of Thursday evening, the state had seen 1,030 confirmed cases and 18 deaths, according to Johns Hopkins figures.

News of the Bay Area’s shelter-in-place order triggered a dash on stores early this week, as residents rushed to panic-buy everything from groceries to pot and video games – forcing shopkeepers to grapple with large crowds at the same time health officials have asked everyone to stand at least six feet apart.

The Bay Area in recent weeks has seen a slow hollowing out of everyday life, as more and more companies have asked employees to work from home and ridership on public transportation has plummeted.

Last week the Bay Area city of Oakland received a cruise ship on which 21 passengers and crew had been stricken with coronavirus; evacuees from the ship are now being held in quarantine.