New York City's subway system will temporarily close for four hours overnight as the city and state combat the coronavirus crisis, Gov. Andrew Cuomo and Mayor Bill de Blasio announced Thursday.

The shutdowns for the largely 24-hour, seven-day system will begin next Wednesday, May 6, with trains being stopped for cleaning from 1 a.m. to 5 a.m. every night, Cuomo said at his coronavirus briefing.

The trains, which have been cleaned every 72 hours, will now be cleaned and disinfected every 24 hours, Cuomo said. "This is unprecedented, but we must do it," the governor said, calling the plan "as ambitious as anything we've ever undertaken."

It is our obligation to do everything we can to keep our essential workers safe.



The MTA stepped up to clean trains and buses every 72 hours (a massive undertaking).



Now, we must clean and disinfect every 24 hours.



This is unprecedented, but we must do it. — Andrew Cuomo (@NYGovCuomo) April 30, 2020

The decision to scale back the hours of the country's largest subway system follows published reports about a growing homeless population on the trains and poor sanitary conditions that have gotten worse over the weeks.

“You now have more homeless people on fewer trains and you have fewer people to conduct outreach for the homeless people,” Cuomo said.

Subway ridership has plummeted 92 percent since New York's stay-at-home order went into place last month. Cuomo described the hours of 1 a.m. to 5 a.m. as "the slow hours," with about 10,000 passengers normally.

Download the NBC News app for full coverage of the coronavirus outbreak

Buses, vans and for-hire vehicles will be used to transport essential workers during the hours the subways are closed, the governor said. "People who need transportation between 1 a.m. and 5 a.m. will have it," Cuomo said.

The system, which in 2018 carried 5.4 million riders daily, has been temporarily closed from time to time before because of hurricanes, blizzards, blackouts and labor strikes and the 9/11 terror attacks, but have otherwise run 24 hours a day for the last 115 years.

Full coverage of the coronavirus outbreak