IT WASN’T JUST that people were getting sick—it was who. And how many.

Hepatitis A is a viral disease that primarily attacks the liver, and if it gets serious—as it can in the elderly and immune-compromised people—it can be fatal. But the graph of casesin the US over time looks like the second, fun half of a roller coaster ride. In the early 1970s, nearly 10,000 people a year got it. By the mid-1980s, the number was half that. (Wheee!) In 1996, the Centers for Disease Control and Prevention started recommending vaccination, and from there it was a fast, bracing plunge to just tens of cases a year.

Then, this past summer, people started getting sick in San Diego. Just a handful at first, among those most at risk. Like HIV, hep A gets transmitted through sex and sharing needles. You can also get it through fecal-oral contact—as can happen when people don’t have access to bathrooms. In San Diego, the infected were primarily homeless, illicit drug users, and men who have sex with men. The initial handful became two handfuls, and then the curve headed upward. Now, a few months later, the toll stands at 546 cases and 20 deaths, with a confirmed spread of another several dozen in Los Angeles and Santa Cruz.

Homeless people present a particular challenge for health—but for reasons as much political as medical. When the urban infrastructure shows signs of weakness, as it has with these hep A outbreaks, it’s not just a medical tragedy. It’s a signal of a failure yet to come. If social policy doesn’t deal with America’s ongoing social and political homelessness crisis, it’s going to be an even worse public health problem later—for everyone.

SAN DIEGO AND Michigan are the biggest person-to-person outbreaks of hep A since the late 1990s, when San Diego regularly saw 400 to 600 cases every year—most of them children, many without symptoms. Today’s epidemiology is vastly different. “We have had only one pediatric case, somebody who had not gotten an immunization. All of our other cases are over 25 years old, and the average age is 44,” says Eric McDonald, the medical director for San Diego County Public Health Services’ epidemiology program. The reason: San Diego has more homeless people now, McDonald says.

That made the outbreak harder to fight. In San Diego, teams of public health workers went into the field, trying to convince people to get vaccinated—it’s a two-shot series, so it requires multiple visits. They installed hand-wash stations near homeless encampments, distributed portapotties, and washed streets with bleach solution. “It’s a crisis within a crisis,” says Wilma Wooten, director of public health services for San Diego County. “The homeless situation is a crisis in San Diego, and thrown on top of that is a hepatitis A outbreak.”

It spread—to Santa Cruz, first, and then LA. First to people who’d been in one of the earlier cities, and then to people who had contact with them. And then, in LA, hep A showed up in two more homeless people who had no contacts that traced anywhere else. “And we thought, ‘Uh oh, now there’s local transmission,’” says Jeffrey Gunzenhauser, interim health officer for the Los Angeles County Department of Public Health. It was enough to declare an outbreak.

As in San Diego, LA public health teams spread out to vaccinate as many people as they could. It wasn’t easy. “Here in LA county, with 58,000 homeless and tens of thousands of others using illicit drugs, we were like, whoa, how many of them would we have to vaccinate?” Gunzenhauser says. “When we approach a homeless encampment, for every one of the individuals willing to vaccinate, two or three others are turning it down.”

The LA public health teams learned two lessons. First, homeless people are much more mobile than they knew. And second, 58,000 people without basic services is a catastrophe-in-waiting. Homeless people often have untreated medical problems, but this is a new scale. “We’ve certainly been very interested in housing as a single important determinant of health in Los Angeles county,” Gunzenhauser says, “but we haven’t thought about homelessness in terms of the threat of communicable diseases.”

ANOTHER WAY TO think about public health solutions for the homeless in America—550,000 people on a given night, says one estimate, with another 1.5 million in shelters or other assisted housing—is as similar to the very poorest in cities around the world, living in what sociologists and urban planners call “informal settlements.” (I’m eliding the rural homeless here, which isn’t totally fair. Stick with me for a bit.)

Around the world, a billion people—much of the urban population—live in these informal settlements—the term of art used to be “slums.” Pollution, disease, and violence are all risks. When large populations of refugees arrive in a city, they often settle in peri-urban areas without services. Most of these people don’t have access to clean water, garbage collection, or a good sewer system. Very bad, right?

In the United States, those services are municipal. Cities provide them—but almost exclusively to places of residence. Water and toilets are literally behind a paywall. City planners today often think about public health in terms of greenspace and tree coverbike paths and other alternatives to automobiles, reducing industrial pollution. All of that’s great, and necessary. Yet basic infrastructure doesn’t seem like a public health measure—until it fails, in places like Flint’s water supply. But denial of service to an entire population is also a kind of failure.

It wasn’t always so. The cities of ancient Rome had public baths, toilets, and potable water. The cholera outbreak in London in 1854 that led the physician John Snow to literally create epidemiology, mapping the homes of affected people to find the source, traced back to a public well. Famously, the city removed the pump’s handle, cutting off access to the water and helping end the outbreak.

I don’t mean to get all paternal here. City people with money have always equated poverty with disease, and conflated the fear of the latter with prejudice against the former. The genius of Haussmann’s widescreen remodeling of Paris was that his sewers lowered the likelihood of disease while razing neighborhoods with narrow, winding streets lowered the likelihood of revolution. Nineteenth-century French colonial cities separated the colonizers from the colonized with a de-urbanized zone they called a cordon sanitairebecause it was nominally there to prevent the spread of malaria.

Even the first zoning regulations in the United States had a (nominal, again) health rationale, stepping back the ever-higher skyscrapers of Manhattan to let light and air into the concretizing canyons. The strain of American Progressivism that comes from the noblesse oblige of the rich has to do with altruism, sure, but also a fear of contagion, as Spiro Kostoff writes in his book The City Assembled. Fear of disease, fear of revolution, fear of the poor—all these things are intertwined.

But if fear of disease serves as a spur to end homelessness, let’s go for it. Because housing and other policies seem to be pushing more and more people to the fringes, and those populations are going to be more and more vulnerable to health issues. This is happening everywhere on Earth. “It’s an increasing polarization between the two halves of society,” says Harris Ali, an environmental sociologist at York University.

It isn’t just that people are getting sick. It’s who, and how many. When people lose access to the last century’s worth of improvements to services and health care, they’re more likely to get sick. And the next outbreak might not be something people can vaccinate against.