Will city life, with all its energy and vitality, survive the coronavirus? Or will social distancing live on to such an extent that it spawns a retreat from urban life and a new wave of sprawling exurban development?

Those questions will likely gain more attention when the world emerges from the current viral threat. COVID-19 has spread most rapidly and lethally in densely populated cities, New York being the prime U.S. example.

Yet, urban density carries with it all manner of social, cultural and economic advantage, the absence of which would render modern life unrecognizable.

Our expectation is that the orchestra concert, the baseball game, the state fair, the farmers market, the college campus, the church service, the bustling restaurant and the face-to-face business meeting will return eventually, perhaps when a vaccine arrives or possibly sooner with new procedures in place.

Meanwhile, lingering anxiety could easily trigger a notable shift toward sparser lifestyles, especially in light of President Donald Trump’s promise (or threat) to develop a national ranking of counties for high, medium or low risk for viral spread. Even before the virus reached these shores, researchers detected some shift away from the highest-cost coastal cities (San Francisco, Seattle, etc.) toward cheaper lifestyles in the countryside or in smaller towns.

“This movement we’re seeing now is not just a reaction to this pandemic,” geographer Joel Kotkin told the Washington Post in describing his new book, “The Coming Age of Dispersion.” Technology enhances the work-from-home alternative, he noted, and some smaller cities (Greenville, S.C., Asheville, N.C., etc.) are taking on a new whiff of sophistication. “You’ll still have urban centers,” Kotkin said, “but they’ll be less intense and more dispersed.”

Dispersal has its downside, of course. Urban density, despite its obvious vulnerability, is an important strategy in humanity’s long-term adaptation to climate change. As it turns out, what’s bad for spreading the virus is good for fixing the climate. Cities offer proximity and the probability of a smaller carbon footprint. Their compact infrastructure operates more efficiently, releasing lower emissions per person.

People drive less often and over shorter distances. Many have the option to walk or bike to destinations, or take mass transit, a carbon-saving advantage that’s viable only in compact communities. Contagion aside, urban lifestyles tend to be healthier because physical exercise is built into the routines of daily life.

Given the toll of this pandemic, however, urban density may be harder to achieve and sustain in the coming years. Still, a dose of perspective might be useful:

• Even ultradense places can avoid the brunt of a pandemic with the right testing, tracing and isolating preparations, as Hong Kong and Singapore proved.

• Density is a relative concept. At nearly 22,000 people per square mile, New York’s population density is double that of Chicago’s, and Chicago’s is roughly double that of Minneapolis’ and St. Paul’s.

Minneapolis’ 2040 Plan caused a lot of stir because of a modest emphasis on density. But even if the plan were fully realized, the city wouldn’t approach the compactness of New York or San Francisco.

There is, perhaps, a sweet spot at which cities such as Minneapolis and St. Paul can retain vitality while avoiding the overcrowding that feeds a pandemic.