Much like it was before the coronavirus swept across the country, the city’s economy was relatively healthy before the Sept. 11 attacks. “But,” Mr. Parrott said, “after 9/11, people woke up and realized that we were in a recession.”

In the wake of that shock, the New York Stock Exchange and other financial markets shut down for a few days and air travel was disrupted for weeks.

But the city began to recover quickly, buoyed by support from Washington, which provided billions of dollars in disaster relief. Theaters reopened, ballgames resumed and elected officials urged New Yorkers to go out, spend money and get back to work.

The 2008 financial crisis was centered on Wall Street, where some major investment banks failed and others survived only through a massive federal bailout.

Now, with no certainty about when life might return to normal, the full effect on the city’s economy is impossible to project, Ms. Lowenstein, director of the city’s Independent Budget Office, said. But Mr. Parrott said the city would almost surely fall into a recession that would end its longest period of expansion and job growth on record — more than 10 years.

This week, the state labor department said that New York City’s unemployment rate fell to an all-time low of 3.5 percent in January, compared with highs of about 8.5 percent in the aftermath of Sept. 11, and 10 percent during the financial crisis.