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

The City That Never Sleeps could be shutting down in 48 hours.

New York Mayor Bill de Blasio said Tuesday that he was considering whether to impose a shelter-in-place order, which would essentially require residents to stay in their homes and keep outside social contact to a minimum to slow the spread of the coronavirus in the nation's largest city.

Full coverage of the coronavirus outbreak

"New Yorkers should be prepared right now for the possibility of a shelter-in-place order," de Blasio said. "The decision will be made in the next 48 hours."

If imposed, the order would follow the lead of several counties in the Bay Area, including San Francisco and Oakland, which are prohibiting everyone from leaving their homes "except for essential needs."

An empty street in Manhattan on Sunday, March 15, 2020. Jeenah Moon / Reuters

De Blasio acknowledged that New Yorkers face "tremendously substantial challenges" if the order is imposed.

"I don't take this lightly at all," he said. "Folks have to understand that right now, with so many New Yorkers losing employment, losing paychecks, dealing with all sorts of stresses and strains, I'm hearing constantly from people who are tremendously worried about how they're going to make ends meet.

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

"In that scenario, a shelter-in-place begs a lot of questions," the mayor said. "What is going to happen with folks who have no money?"

New York, which is home to more than 8 million people, has 923 cases of the coronavirus and has recorded at least 10 deaths since the outbreak began hitting the U.S. in late January, de Blasio said Tuesday night.

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

De Blasio in recent days has made sweeping declarations to close schools through April 20 and limit restaurants and bars to takeout and delivery only. In addition, nightclubs, movie houses, Broadway theaters and concert venues have shut their doors as health officials have promoted the need for social distancing.

During the news conference, de Blasio did not divulge details on what a shelter-in-place order would look like. But he compared the crisis to the 1918 flu pandemic, which infected one-third of the world's population and killed an estimated 50 million people, including 675,000 in the U.S. alone.

"In terms of the economic dislocation, I think it's fair to say we are going to quickly surpass anything we saw in the Great Recession, and the only measure or the only comparison will be the Great Depression," de Blasio said.

Earlier, New York Gov. Andrew Cuomo ruled out placing New York City under quarantine and completely sealing off the city, as officials have done in China and Italy.

"That cannot happen legally," Cuomo said. "No city in this state can quarantine itself without state approval, and I have no interest whatsoever, and no plan whatsoever, to quarantine any city."

On "TODAY" on Wednesday morning, de Blasio said he has made it clear that a shelter-in-place order can only be made with the State of New York. He said he was "almost" at the point of recommending such a move to the governor.

"People have to realize at this point that this disease is going to put many, many people, thousands and tens of thousands of people's lives in danger, and we're going to have to do things very differently," the mayor said.

"It has to be considered as seriously starting today," he said in the Wednesday interview.

Top commanders at the New York Police Department were surprised by de Blasio’s announcement Tuesday of the possibility of such an order, senior law enforcement officials said.

One senior NYPD official said mouths were open in astonishment as they watched the mayor announce the possibility of a shelter-in-place policy.

When asked for comment on such a plan, NYPD spokespeople referred calls to the mayor’s office. A Wednesday request for comment from the mayor's office was not immediately returned.

Leaders in New York, New Jersey and Connecticut have coordinated efforts to curb social interactions by prohibiting crowds of 50 or more people, including at private events.