Caution tape is seen at a subway train on April 29, 2020 in New York City.

New York City is suspending 24-hour subway service to disinfect subway cars and protect essential workers during the coronavirus crisis, Mayor Bill de Blasio and Gov. Andrew Cuomo announced Thursday.

"They can disinfect all trains and buses every night," Cuomo said at a news briefing. "It can best be done by stopping train service from 1 a.m. to 5 a.m. every night during the pandemic so they can actually perform this service."

The Metropolitan Transit Authority, which runs the city's public transit system, will still provide buses as and "dollar vans" at no cost to essential workers during those hours, said Cuomo. On Wednesday, Cuomo said he ordered the MTA to develop a cleaning plan after he read reports that the subway system had deteriorated, with a recent surge in crime and trains filled with homeless people.

The subway system has been lauded for its 24 hour daily service. Service has been ordered to halt before, but rarely and usually for natural disasters.

Representatives of the MTA did not immediately respond to CNBC's request for comment.

Cuomo said the change in hours will begin May 6. He added that police and homeless outreach workers will clear people out of the subway at 1 a.m.

"If you're not going back and forth all night on a train, then you're actually coming above ground where outreach workers are there to help you, where NYPD officers trained in homeless outreach are there to support homeless people and get them to a better situation," de Blasio said.

Before the announcement, the MTA was cleaning subway cars every 72 hours, Cuomo said.

The coronavirus can survive on surfaces for hours and sometimes days, depending on the material, research has shown. Cuomo said the subway could be a driver of transmission in the city, which has confirmed more than 164,000 Covid-19 cases since the outbreak began, according to data compiled by Johns Hopkins University.

Cuomo added that MTA workers have been infected by the coronavirus and some have died of Covid-19.

Cuomo said 1 a.m. to 5 a.m. is the the lowest ridership time and estimated that 10,000 people ride the system during that period. Despite an overall 92% drop in ridership, according to Cuomo, some crimes have increased on the subways during the coronavirus pandemic.

The MTA will also disinfect the Metro North line and the Long Island Rail Road, Cuomo said, adding that this can be done without disruption to service.

"This is going to be one of the most aggressive, creative, challenging undertakings that the MTA has done," he said. "It's going to require the MTA, the state, the city, the NYPD to all work together. It's not that easy to stop train service."

The MTA is governed by a 21-member board whose members are nominated by the governor, with four recommended by New York City's mayor, according to the MTA's website.