SACRAMENTO, Calif. -- 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.

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.

"I can assure you home isolation is not my preferred choice, I know it’s not yours, but it’s a necessary one,” Newsom said at an evening news conference streamed on social media.

He assured residents that they “can still take your kids outside, practicing common sense and social distancing. You can still walk your dog.” Restaurant meals can still be delivered to homes.

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 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.

"I don’t believe the people of California need to be told through law enforcement that it's appropriate just to home isolate," he said.

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 also 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. He also asked Trump to dock the Navy's 1,000-patient Mercy hospital ship in the Port of Los Angeles.

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.

Newsom's statewide order came after counties and communities covering about half the state's population already had issued similar edicts. He said the restriction is “open-ended” because it could raise false hopes if he included an end date.

However, he did offer a glimmer by saying he didn't expect it would last “many, many months."

Just before Newsom's statewide declaration, Los Angeles announced what officials there called a “Safer at Home" order that carried the same restrictions.

“We’re about to enter into a new way of living here in Los Angeles," Mayor Eric Garcetti said. “What we do and how we do it and if we get this right will determine how long this crisis lasts."

In the letter to Trump seeking the hospital ship, Newsom said California's infection rates are doubling every four days in some areas and that 56% of the state's population could contract the virus in the next eight weeks, which would be more than 22 million people. He later said the “overwhelming majority won’t have symptoms" and will be fine but that up to 20,000 could be hospitalized.

“If we meet this moment we can truly bend the curve" of escalating cases, Newsom said.

For most people, the new coronavirus causes only mild or moderate symptoms, such as fever and cough. It can cause more severe illness, including pneumonia, for some people, especially older adults and those with existing health problems.

Most people recover — those with mild illness in about two weeks, while those with more severe illness may take three to six weeks, according to the World Health Organization.

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.

———

Associated Press writer Adam Beam contributed to this story.