RICHMOND, Va. (AP) — Virginia Gov. Ralph Northam on Monday issued a statewide stay-at-home order along with a lecture for those who packed the state’s beaches last weekend or otherwise ignored calls to avoid mass gatherings.

“You are being very, very selfish because you are putting all of us, especially our healthcare providers, at risk,” Northam, who is also a doctor, said at a news conference. “To date, this has been a suggestion to Virginians. Today, it’s an order.”

Northam’s executive order tells the state’s approximately 8.5 million people they must stay home except for limited circumstances, such as traveling to or from work, seeking medical attention, obtaining goods and services, including food, or engaging in outdoor activity. The order also adds restrictions to the state’s public beaches, closing them to sunbathing but permitting exercising and fishing.

The order lasts until June 10, but the governor could rescind it before then.

“Do not go out unless you need to go out. This is very different from wanting to go out,” he said.

Those who violate the executive order could be subject to misdemeanor criminal penalties, but the governor said he’s expecting people to comply voluntarily.

“This is not a time … when we’re looking to put people in jail,” Northam said.

Northam’s move is in line with steps taken by governors in neighboring Maryland and North Carolina.

Northam’s order also directs universities to stop any in-person classes and instruction, a move likely directed at Liberty University. The governor has criticized Liberty President Jerry Falwell Jr. for welcoming students back to the Lynchburg campus.

The number of confirmed COVID-19 cases in Virginia surpassed 1,000 on Monday, with more than two dozen deaths from the illness, according to the state health department.

Among the confirmed cases, over 130 required hospitalization, according to the latest Virginia Department of Health figures.

For most people, the new coronavirus causes mild or moderate symptoms, such as fever and cough that clear up in two to three weeks. For some, especially older adults and people with existing health problems, it can cause more severe illness, including pneumonia and death.

The U.S. had more than 144,000 COVID-19 cases reported by Monday afternoon, with more than 2,500 deaths, according to data compiled by Johns Hopkins.

Dr. Anthony Fauci, the government’s top infectious disease expert, said over the weekend that the U.S. could experience between 100,000-200,000 deaths and millions of infections from the pandemic.

President Donald Trump over the weekend extended restrictive federal social distancing guidelines through April 30. At the state level, Northam had already closed schools for the remainder of the academic year, banned large gatherings and ordered the closure of certain businesses.