Illinois Gov. J.B. Pritzker, left, announces a shelter in place rule to combat the spread of the Covid-19 virus, during a news conference Friday, March 20, 2020, in Chicago. (AP Photo/Charles Rex Arbogast)

Illinois Gov. J.B. Pritzker on Friday ordered all state residents to remain in their homes except for essentials, joining similar dramatic efforts in California and New York to limit the spread of the coronavirus.

Pritzker's order, which takes effect Saturday at 5 p.m. and is set to expire April 7, still allows the state's 12.6 million residents to head outside to buy groceries and medicine.

"If there are actions that I can take that will save lives in the midst of this pandemic, no matter how difficult, then I have an obligation," Pritzker said. The Democrat said he was trying to prevent "potentially tens of thousands" of deaths but urged people not to panic.

"For the vast majority of you already taking precautions, your lives will not change very much," he said, adding that people can continue to shop for groceries and visit pharmacies, gas stations and banks. Residents also can continue to pick up meals from restaurants and exercise outdoors, he said.

Pritzker acknowledged that the state doesn't have the resources or "the desire" to broadly enforce the order, but he said law enforcement will take action if necessary in individual cases. The order exempts people who work in many essential industries, including , manufacturing, transportation and food production or sales, including at and restaurants.

Chicago mayor Lori Lightfoot, left, speaks after Illinois Gov. J.B. Pritzker announced a shelter in place order to combat the spread of the Covid-19 virus, during a news conference Friday, March 20, 2020, in Chicago. (AP Photo/Charles Rex Arbogast)

The stay-at-home order will also mean schools statewide remain closed until April 8, he said.

Pritzker had previously ordered all schools statewide to shut down through the end of March and limited gatherings to 50 people to curb the spread of the in the state. He also closed dine-in service at bars and restaurants, but allowed businesses to continue delivery or carryout options.

The governors of California and New York have issued similar orders.

Chicago Mayor Lori Lightfoot, who stood by Pritzker's side as he announced the order, said she agreed with the decision.

"Think of this as safer at home," she said.

For most people, the coronavirus causes only mild or moderate symptoms, such as fever and cough. For some, especially and people with existing , it can cause more , including pneumonia.

  • A reporter wears rubber gloves as they record Illinois Gov. J.B. Pritzker announcing a shelter in place rule to combat the spread of the Covid-19 virus, during a news conference Friday, March 20, 2020, in Chicago. (AP Photo/Charles Rex Arbogast)

  • Illinois Gov. J.B. Pritzker, left, announce a shelter in place order to combat the spread of the COVID-19 virus, as Chicago mayor Lori Lightfoot, right, listens, during a news conference Friday, March 20, 2020, in Chicago. (AP Photo/Charles Rex Arbogast)

  • Chicago mayor Lori Lightfoot responds to a question after Illinois Gov. J.B. Pritzker announced a shelter in place order to combat the spread of the Covid-19 virus, during a news conference Friday, March 20, 2020, in Chicago. (AP Photo/Charles Rex Arbogast)

The vast majority of people recover from the virus. According to the World Health Organization, people with mild cases recover in about two weeks, while those with more severe ones can take three to six weeks to get better.

As of Friday afternoon, Illinois has reported 585 cases of COVID-19 in 25 counties, up from 422 a day earlier. The state reported one more death Friday—a woman in her 70s from Cook County—taking the state's toll to five.