Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

The governor of Illinois issued a stay-at-home order on Friday, making it the latest state to make such a sweeping mandate in the fight against the spread of the new coronavirus.

California issued a stay-at-home order Thursday, and New York's governor mandated that all nonessential businesses keep workers at home. Pennsylvania's governor has also ordered that all businesses that are not "life-sustaining" close.

Illinois Gov. J.B. Pritzker announced the decision for his state at a press conference Friday afternoon.

“I don’t come to this decision easily,” he said. “I fully recognize that in some cases, I am choosing between saving people's lives and saving people's livelihoods. But ultimately you can't have a livelihood if you don't have your life."

Pritzker said residents will be able to leave their homes to do normal tasks like buying food, picking up a prescription at the pharmacy or going for a walk.

He said the goal of the stay-at-home order is for people to maintain social distancing and for those who have already taken precautions their lives "will not change very much."

Chicago Mayor Lori Lightfoot urged the community to take the order seriously.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

“This is a make-or-break moment for our city and our state,” she said.

The order is expected to become effective Saturday evening and will remain in place until April 7 but could go longer, the governor said.

Illinois, with a population of around 13 million, had 585 confirmed cases and five deaths, as of Friday evening. The first death was announced on Tuesday and was a woman in her 60s who had an underlying health condition, according to NBC Chicago.

Pritzker announced three more deaths on Thursday.

The state's stay-at-home mandate comes less than 24 hours after California Gov. Gavin Newsom issued such an order, which went into effect Thursday night and will remain in place until further notice.

The California order says residents should leave their homes only when necessary.

"Those that work in critical sectors should go to work. Grocery stores, pharmacies, banks and more will stay open. We need to meet this moment and flatten the curve together," Newsom said in a tweet.

The state, which has a population of around 40 million, has had more than 1,000 people test positive for coronavirus and at least 19 deaths.

Shortly before Newsom's announcement, Los Angeles County ordered people to stay home except for essential needs or jobs. It also told indoor shopping malls and nonessential retail businesses to close.

San Francisco and surrounding counties had previously issued stay-at-home orders. Newsom said the statewide order will be consistent with the local orders and places like grocery and convenience stores, delivery restaurants, gas stations, pharmacies, banks and laundromats will stay open.

New York also rolled out its new mandate on Friday. In addition to Gov. Andrew Cuomo's ordering all nonessential businesses to cease operating outside the home, he put new requirements in place for people over 70 or with underlying health conditions to avoid public transportation and stay home except for solitary exercise.

The requirements also urge New Yorkers to practice social distancing and to stay in their homes as much as possible.

“Your actions can affect my health, that is where we are," Cuomo said at a Friday press conference.