Police violence, a pandemic, economic disaster — lately, urban living doesn’t seem all that great. The coronavirus has ravaged big cities like New York, killing tens of thousands and sending some rich folks scattering to the suburbs. (Struggling essential workers were left behind.) Even as urban centers begin to recover, progress is fitful; some rural and largely Republican counties, meanwhile, remain relatively untouched by a disease that kept big cities on lockdown for months.

The problem, many have said, is having too many people living in one place — urban density. According to one analysis, the 100 most densely populated counties in the United States have death rates four times higher than the country at large. Even Governor Andrew Cuomo of New York has blamed it for the spread of COVID-19. “There is a density level in NYC that is destructive,” he tweeted last month. “It has to stop and it has to stop now.”

Urban density has long been considered a good thing, both for public health and for the environment. City residents often get better medical care and have smaller carbon footprints: They’re more likely to take public transit and live in smaller, more energy-efficient apartments. If density is the culprit behind the worst disease outbreaks, that could challenge the way modern society is organized — and send even more people fleeing the inner city for the relative safety of the suburbs.

That thinking, though widespread, has come under scrutiny. Back in April, researchers from the World Bank analyzed COVID-19 spread in 248 cities in China, and found that many densely populated cities didn’t have especially high per-capita caseloads. Shanghai, for example, is the tenth-most densely populated city in the world, but maintained infection rates far lower than some of its more sparsely populated neighbors.

Grist thanks its sponsors. Become one.

That seems counterintuitive. Surely being in closer contact with other people increases risk of getting the disease? But James Spencer, professor of city and regional planning at Clemson University, said that one source of confusion is how “density” is defined. “Density is about physical proximity in space,” he said. “So clearly, density matters. But nobody’s really talking about density of what.”

One of the easiest metrics to analyze is the number of people per square mile — population density. (That’s what the World Bank study measured.) But some of the densest cities in the world have come out of the pandemic relatively unscathed. Seoul is twice as dense as New York City, but has managed to keep its caseload to just a little over 1,000, compared to New York’s whopping 215,000. San Francisco is the fourth-densest city in the United States, but has only reported a few thousand cases. Other mega-cities in Asia, like Singapore, Hong Kong, and Tokyo, have also escaped the worst of the disease so far.

Grist thanks its sponsors. Become one.

That’s part of why some experts have argued that we need to look at “internal density.” There is a growing consensus around how COVID-19 spreads: mostly indoors, via close contact (within 6 feet), and over extended periods of time (greater than 15 minutes). So residents are unlikely to catch the disease on city streets, but they could get the virus in crowded apartment buildings, dormitories, nursing homes or even packed subway cars.

“We have to make a distinction between density and overcrowding,” said Jason Corburn, professor of urban planning and public health at the University of California, Berkeley. According to Corburn, the biggest problem for COVID-19 infection isn’t the general metric of people per square mile, it’s about how many people are forced into cramped housing with no way to keep 6 feet apart.

“Why do we not see high infection rates in the Upper East Side of Manhattan, which is more dense than the South Bronx?” Corburn said. “Overcrowding is what we need to be concerned about, and that’s about inequity.”

Recent reports have shown that “overcrowded” households — homes in which there are more occupants than rooms (excluding bathrooms) — are at particularly high risk for COVID-19. According to an analysis by ProPublica Illinois, neighborhoods of Chicago with low density but high crowding have seen higher per-capita infections than some high-density neighborhoods. Similarly, a CalMatters investigation of 10 counties in California found that neighborhoods with many overcrowded homes had 3.7 times the rate of coronavirus infections than neighborhoods with fewer people packed into one house or apartment. To make matters worse, according to the report, about two-thirds of California’s overcrowded homes include bus drivers, healthcare professionals, or other essential workers.

“If you were to look at this biologically, the virus can only be transmitted in close, prolonged contact,” said Lee Riley, chair of infectious disease and vaccinology at Berkeley’s School of Public Health. He suspects that many transmissions are taking place in crowded households — particularly households with essential workers who are exposed to many people during the day.

“If you’ve got 12 people living in a one bedroom apartment, that’s a potential vector for spread,” Corburn said. But public health experts also have to consider “the reason why people are forced to live in that housing in the first place,” he said. Redlining — the 20th-century practice of denying home loans and insurance to minorities– forced many Black and Latino families away from the suburbs and into inner cities. The legacies of those policies persist today, as many formerly redlined neighborhoods are more likely to be exposed to heat waves and asthma-inducing air pollution. That creates a whole mess of overlapping problems, as people in crowded homes may also have pre-existing conditions that make COVID-19 more deadly and lack access to parks or open spaces for social distancing.

That means that the spread of pandemics in cities isn’t just about combating density — it’s also about addressing the underlying inequalities that force people to live in unhealthy environments and shoring up neighborhoods’ public health. Spencer says that there are lessons from other countries: In Vietnam, for example, strong public health campaigns and coordination from community leaders dramatically slowed the spread of the disease. In Hong Kong, citizens organized their own coronavirus response. If U.S. cities are going to respond better to future pandemics, experts say they’re going to need stronger health infrastructure for the most vulnerable — and housing policies that right historical wrongs.

Pandemics, we are often told, reveal a society’s hidden flaws. The coronavirus has shown that America remains highly polarized and unequal. That’s especially true for urban centers where nearly a third of the country’s population lives.

“We have not, in the United States, addressed the fundamental inequalities in cities,” Corburn said. “And we must — if we’re going to have a healthier kind of urban environment.”