California's 40 million residents should stay home indefinitely and venture outside only for essential jobs, errands and some exercise, Gov. Gavin Newsom said Thursday, warning that the coronavirus threatens to overwhelm the state's medical system.

"This is a moment we need to make tough decisions. This is a moment where we need some straight talk and we need to tell people the truth," the governor said.

At the time of his announcement, there were already 21.3 million Californians in 20 counties under similar orders.

The move, the most sweeping by any state so far, was an exclamation point at the end of a week of increasingly aggressive moves meant to keep the virus in check by forcing people to stay away from each other as often as possible.

The governor said he doesn't expect police will be needed to enforce his stay-at-home order, saying "social pressure" already has led to social distancing throughout the state.

"We are confident the people of the state of California will abide by it. They’ll do the right thing, they’ll meet this moment, they’ll step up as they have over the course of the last number of week to protect themselves, their families and to protect the broader community, and this great state and the world we reside in," Newsom said.

Just a nod and a look saying, 'Hey, maybe you should reconsider being out there on the beach, being 22-strong at a park.' California Mayor Gavin Newsom

Residents are still allowed to leave their homes for essential needs like medical care and grocery shopping.

The Democrat, who is barely a year into his first term, also called up 500 National Guard troops to help distribute food. The move comes after panic buying led to massive lines at some grocery stores.

Newsom outlined a series of steps aimed at providing more space for hospital patients.

He said the state has taken over a 357-bed bankrupt hospital in the San Francisco Bay Area, soon will announce the purchase of a similarly sized hospital in Southern California and may use dormitories at the state's public colleges and universities.

The announcement came after the release of a letter to President Donald Trump where Newsom warned the virus was spreading quickly and eventually could infect more than half the state's population. A spokesman later clarified that the figure did not take into account the aggressive mitigation efforts that have been made.

The governor wrote that, "In some parts of our state, our case rate is doubling every four days. Moreover, we have community acquired transmission in 23 counties with an increase of 44 community acquired infections in 24 hours."

Newsom predicted that 56% of California’s population – roughly 25.5 million residents – could be infected with the novel coronavirus over an eight-week period.

In his letter to Trump, Newsom requested the USNS Mercy Hospital Ship, which is based in San Diego, be stationed at the Port of Los Angeles to help the region’s health care system overwhelmed by the pandemic. He wrote the Mercy would ensure that California had "the ability to address critical acute care needs, such as heart attacks and strokes or vehicle accidents."

The Mercy is one of several ships being mobilized to help with the influx of hospital patients. The ships are meant to treat those in the hospital for reasons other than COVID-19, the Navy clarified.

"The Comfort and Mercy will not deploy to treat COVID patients, but will be made available to assist with treatment of other patients in coastal locations where local health professionals are necessarily focused on a large number of COVID cases," the Navy confirmed in a statement to NBC 7.

The two ships each have about 1,000 rooms and 12 fully-equipped operating rooms, digital radiological services, a medical laboratory, a pharmacy, an optometry lab, a CAT-scan and two oxygen-producing plants, according to the U.S. navy. They are typically deployed to provide humanitarian assistance and disaster relief.

Newsom requested the Mercy be stationed in Los Angeles until, at least, Sept. 1, 2020.

Also Thursday, Newsom asked U.S. House and Senate leaders for $1 billion to support state and local health systems. He said that money would be needed to do things like set up state-run and mobile hospitals, housing options to help people socially distance and testing and treatment for people without health insurance.

He also asked for assistance so the state can extend unemployment benefits beyond the usual 26-week limit, expand food assistance programs, resources for the homeless and tribal communities and boost childcare programs. He further asked for assistance for schools, aid to local and state budgets and transportation relief.

"While California has prudently built a sizable Rainy Day Fund over the past ten years, the economic effects of this emergency are certain to mean that the state and its 58 counties will struggle to maintain essential programs and services," he wrote.

Newsom earlier announced $150 million of a $1 billion emergency state appropriation would go toward getting homeless people off the streets. He has estimated up to 60,000 of the state's homeless could get infected.

The coronavirus is spread through sneezes and coughs. There are at least 1,030 confirmed cases in California and 18 people have died, according to a tally by Johns Hopkins University.