California Gov. Gavin Newsom announced a “stay at home” order for the entire state Thursday evening, just after the city of Los Angeles issued a similar citywide mandate in a desperate effort to control the spread of the new coronavirus.

“Home isolation is not my preferred choice, it’s not yours,” he said. “This is not a permanent state, this is a moment in time... we will look at these kinds of decisions as pivotal decisions.”

The statewide order was set to go into effect at midnight and remain in force until further notice. California, a state of almost 40 million people, is the first in the U.S. to issue such a sweeping directive.

New York Gov. Andrew Cuomo, for instance, has said he has not plans for a shelter-in-place order—even though New York has more than four times the number of infections.

California’s “stay at home” policy will allow residents to run errands like going grocery shopping and will be permitted on walks outside while practicing social distancing. Employees working in essential jobs will also be permitted to work outside the home.

Newsom said the order had “no specific deadline” for the time being.

The directive comes after Los Angeles issued a similar order on Thursday, which mandates residents to stay indoors except for “essential activities.” According to BuzzFeed News, the Los Angeles order was slated to stay in place until April 19.

Nearly 1,000 people in California have tested positive for COVID-19, and there have been at least 18 deaths.

Newsom projected that over half of the state would be infected with the coronavirus over the next few weeks. In a Thursday letter to President Trump, the governor wrote that “roughly 56% of our state’s population—25.5 million people—will be infected with the virus over an eight-week period.”