Flint, Michigan is certainly not the first U.S. city to see its water contaminated by aging pipes. And, unless the many American cities with aging lead pipes get to work quickly, it will not be the last, either.

The poisoned tap water of Flint serves as a warning sign to city officials throughout the U.S: Lead pipes installed in cities 100 or more years ago need to be replaced.

In 2004, The Washington Post reported high levels of lead in the DC water supply, and later studies detected the toxic metal in many residents’ blood. Greenville, North Carolina; Sebring, Ohio; and Providence, Rhode Island have also recorded high lead levels in recent years. Meanwhile, the plumbing in big cities such as Philadelphia and Chicago is showing its age. Unless these cities—among many others—replace their lead plumbing root and branch, as DC has begun to do, they are at risk of undergoing a crisis comparable to what we are seeing in Flint.

“Any city that fits a profile of neglect, decline, or poverty is vulnerable,” said David Zetland, a professor at Leiden University The Hague in Holland and the author of The End of Abundance: An Economic Solution To Water Scarcity.

In August, a group from the National Drinking Water Advisory Council convened by the Environmental Protection Agency recommended changes to the almost 25-year-old Lead and Copper Rule that would accelerate the replacement of lead service lines (those that run from the mains to consumers’ properties) nationwide. “There is no safe level of lead,” the council’s working group wrote in its report.

Not everyone thought the proposed changes were strong enough. Frustrated by what she considered a toothless plan, Yanna Lambrinidou, a dissenting member of the group, recently told The Guardian that current lead testing regimes are riddled with loopholes.

Flint’s Avoidable Water Disaster

What happened in Flint was not entirely the result of aging pipes. A tragedy of misfortune and mismanagement culminated in the deaths of at least nine people.

The city of Flint was incorporated in 1855, just as water mains were becoming increasingly common in American cities. While lead’s toxic qualities were well known at the time, the impermeable yet malleable metal was considered a necessary evil for cities until the mid 20th century. Lead was so ubiquitous in the trade that the very word “plumbing” comes from the Latin for the mineral. In some cities, such as Chicago, lead pipes were even required by the building code up until the 1980s.

It was not until 1991 that the Environmental Protection Agency’s Lead and Copper Rule restricted lead levels in drinking water supplies. Under this rule, additives were required to prevent corrosion on legacy pipes, the main cause of contamination.

When officials in Flint decided in April 2014 to switch the city’s water source from Lake Huron to the Flint River to save money, they neglected to change the mix of additives. “A switch of water supplies … changed pipe chemistry and increased lead leaching,” said Zetland.

Marc Edwards, a professor of civil engineering at Virginia Tech University, warned the city of Flint for years that the Flint River was far more corrosive than Lake Huron water. Edwards even demonstrated in laboratory experiments that reactions between the water and the pipes would create ideal conditions for the spread of pathogens. His prediction proved hauntingly accurate, with nine deaths attributed to the waterborne bacterial Legionnaire’s disease in the last two years in Flint.

Even after the inadvisable water source switch was made, Flint’s water department could have averted disaster by using additives to diminish the corrosiveness of the water at negligible cost. And even after the lapse in treating the water with additives was discovered, the Michigan state government could have saved the public from exposure.

Now, the damage is done. If Flint is ever going to be habitable again, the city’s plumbing will most likely need to be replaced wholesale, lead and non-lead pipes alike.

American Cities At Risk

Lead pipes are prevalent in cities that were developed in the 19th and early 20th centuries, meaning all the major metropolitan areas in the Northeast, Midwest, and California. By the latter half of the 20th century, lead was rarely used in city pipes. An official from the Dallas water utility recently told The Dallas Morning News that the North Texas city had no lead service lines.

The American Water Association, a group representing utilities nationwide, recently gave the Associated Press an estimate that there are 6.5 million lead pipes in use in the U.S. This represents a small, but significant, portion of pipes running from U.S. city water mains to households and businesses.

In Philadelphia alone, there could be 50,000 lead service lines, according to Gary Burlingame, director of the Philadelphia Water Department’s bureau of laboratory services.

Replacing service lines nationwide would cost billions of dollars. If cities could ever justify that spending, it would be now, while the memory of Flint is still fresh in Americans’ minds.

But Who Will Foot The Bill?

Before American cities can accelerate their lead-pipe replacement plans, as recommended by the EPA’s drinking-water council, they’ll need to answer one major question: Who will pay for all this work?

Most U.S. cities, according to Michael Deane, executive director of the National Association of Water Companies, have budgeted in terms of a “300-year replacement cycle to replace the pipes in the ground.” But the American Society of Civil Engineers say pipes reach the end of their useful lives in 95 years. In other words, cities’ budgets are woefully inadequate for replacement needs. The ASCE said some studies estimated an additional $1 trillion should be spent over a 25-year period for the most urgently needed pipe replacements—lead and otherwise.

Most cities take a piecemeal approach, replacing sections of lead pipe only when they fail. That may heighten the risk of water contamination. And some research suggests that removing some lead pipes can cause leaching from others nearby.

If cities don’t “get ahead” of the aging pipe problem, they will end up paying in the long term, Deane warned in an interview with Fortune some months ago. “Replacing infrastructure gets very, very difficult particularly in urban areas…. It’s very, very difficult to dig up pipe and very costly. Too often, there’s a disconnect in people’s understanding…. [To] receive the water delivered by that infrastructure, they as customers need to pay for that infrastructure.”

A Question of Political Will

After the lead scandal in Washington DC, the nation’s capital initially committed to a $400 million lead-pipe replacement program. After about half the city’s 35,000 lead pipes were replaced, a “cost benefit analysis” during the onset of the Great Recession in 2008 led the city to abandon the program. DC said it would replace other lead pipes only when they failed.

DC Water recently imposed a monthly infrastructure fee, effectively boosting water rates to pay for replacing and repairing aging pipes. The government in Ireland, where both Dublin and Cork have suffered from high rates of water leakage, established a controversial new agency to collect water rates for the first time in a generation.

Like DC, much of Philadelphia’s city plumbing is more than 100 years old, with some mains closer to 200 years old.

Burlingame of the Philadelphia Water Department said it was still too early to judge what exactly went wrong in Flint. “My understanding is that Flint had access to experts with all the up-to-date information available to them, but they did not make appropriate use of that information in making the best decision for the water consumers,” he said.

In Philly and many other cities, the service lines are technically owned by the property owners, Burlingame said. The Water Department is weighing incentives for property owners to change their lead pipes.

For now, the Philadelphia Water Department alerts property owners with lead service lines when they are digging up nearby streets to give them an opportunity.

In Philly, “rusty water” from old cast iron mains—an issue of potability rather than health—is another problem that would require billions of dollars to eliminate.

In the wake of a scandal about lead levels in water fountains at Los Angeles schools, the unified school district there estimated it would cost $330 million to replace all the lead pipes serving the schools alone.

Chicago has embarked on the replacement of 900 miles of old city water mains for environmental and efficiency reasons. Still, as pointed out in a report from the American Society of Civil Engineers, the Second City laid 75 miles of such pipes every year from 1890 to 1920, meaning that many more will soon need replacement.

A Warning Sign of Bigger Problems: Leaky Pipes

Civil engineers can assess the condition of city plumbing by measuring the amount of non-revenue water in the system. This is water that leaves the treatment plant but, owing to leaks, fire hydrants set off during block parties, or other problems, is never accounted for in utility bills.

Zetland said that Flint had a history of non-revenue water issues. Now, leaky water systems do not necessarily mean contamination problems are in the immediate offing, but they offer a sign that the water system is old, and aging water works does lead to problems.

Monitoring of non-revenue water is incomplete, but, of those that report it regularly in the U.S., Philadelphia has one of the highest rates of leakage. According to a 2012 audit, about 38.4% of the city’s water is non-revenue, meaning that roughly four out of every 10 gallons of water that enter the system are never accounted for.

Burlingame says persistent leaks are taken into account when the department makes decisions on what pipes to replace. Age is not always the only consideration, he says: not all old cars are lemons.

Modern water crises have been anticipated in places such as Israel, California, and Australia, all of which prioritize water planning. But if it can happen in Flint, a stone’s throw from the largest bodies of freshwater in the world, a crisis like this can happen anywhere.