The debacle in Flint, Michigan was a betrayal of the public trust at every level of government. The horror of people drinking poisoned water is a microcosm of the sad deterioration of one of America’s greatest accomplishments: the creation of infrastructure to provide virtually universal access to clean water and wastewater treatment.

Across America, water and sewer plants, pipes, and valves are reaching or beyond the end of their useful lives. By failing to invest in maintaining the city’s drinking water infrastructure, Flint officials acted no differently than those in thousands of other communities – high- and low-income – who are neglecting the promise of government that all residents have the right to clean water.

In early twentieth century America, it was not safe to drink water from public taps. Cities routinely dumped raw sewage into nearby rivers, thus causing their downstream neighbors to suffer epidemics of waterborne diseases, such as cholera, dysentery, and typhoid. This practice finally ended after Congress passed the 1972 Clean Water Act, which underwrote the costs of municipal water treatment plants.

In the 1980s, Congress’s taste for funding the construction costs waned, and it created a revolving funds program, which provided low-interest loans to states and cities. That worked pretty well for a while. But, in subsequent decades, spending on water and wastewater infrastructure plummeted. In the aftermath of the Great Recession, the American Recovery and Reinvestment Act of 2009 (Mr. Obama’s stimulus program) devoted only $6 billion out of $800 billion to our water systems. That’s not chump change but the scale of the problem is immense.

Our water infrastructure consists of approximately 54,000 drinking water systems, with more than 700,000 miles of pipes, and 17,000 wastewater treatment plants, with an additional 800,000 miles of pipes. A 2012 report of the American Water Works Association concluded that more than a million miles of these pipes need repair or replacement. That’s why communities across the nation suffer 240,000 water main breaks per year. The major cause of pipe failure is age.

The negative health and environmental effects of decaying water infrastructure, as in Flint, stretch far beyond lead poisoning. Corroding pipes may leach cadmium, copper and iron into drinking water. Leaking pipes compromise water pressure and may induce contaminants to enter the drinking water system. Deteriorating sewer pipes leach fecal matter into aquifers and rivers. Aging treatment plants may fail to remove bacteria, parasites, and endocrine-disrupting compounds. No one knows which communities will be the next Flint; but these potential risks will turn into health crises without aggressive steps to modernize the infrastructure.

Episodes such as Flint undermine the public’s confidence in the safety of their drinking water. As Americans begin to doubt the quality of municipal water, some will opt out, choosing to install expensive water filtration systems in their homes. When more affluent citizens no longer have a stake in maintaining high-quality municipal water, that leaves behind people of more modest means – people without the same influence on elected officials.

The water lost from leaking pipes exceeds seven billion gallons a day. No one has estimated how much cities spent treating this water to drinking water quality. Whatever the amount, it’s lost revenue, never to be repaid by customers. Upgrading our water infrastructure will require substantial capital. Estimates range from $682 billion by the EPA to more than $1 trillion by the American Water Works Association.

Solving this problem presents a daunting challenge that asks us who we are as a people. Do we care enough about our communities to make water infrastructure a priority? It won’t be an easy road: No politician wants to run for reelection on a campaign of having overhauled the sewer system. Yet, recent polls suggest that Americans want public officials to act and are ready to pay more for a secure supply of safe water.

Public officials—local, state, and federal—must devote substantial funds to modernize water and wastewater systems. Congress, in particular, should initiate a new Clean Water Act program to underwrite the costs of municipal water treatment plants and should vastly increase funding for loans to states and cities. State and local governments should issue ultra-long-term government bonds (perhaps for 50 years as European governments have recently done), so that modernization can begin now but the repayment costs spread out over longer periods. Finally, to generate needed funds, one sensible option is to enter public-private partnerships that tap into the capital markets for construction costs in exchange for a system of rates and fees to reimburse the lenders.

Our water and wastewater systems have set the benchmark for the world. We should feel pride in this stunning achievement. Now, we need to summon the resolve to fix the problem and maintain the proud tradition of providing safe, clean water and wastewater treatment to virtually every American.

Robert Glennon is a Regents’ Professor at the University of Arizona and author of Unquenchable: America’s Water Crisis and What To Do About It.