The story of Flint, Michigan, is one of poisonous water, but also dirty politics and distorted incentives that led politicians into bad decisions.

In April 2014, in the midst of a financial emergency, Flint switched from Detroit’s water system, which draws from Lake Huron, to the Flint River. This was expected to save the city about $5 million, but the river water was 19 times more corrosive. This leached iron and lead from old pipes into city tap water.

City officials also didn’t treat the water with chemicals that coat the interior of delivery pipes to help prevent lead particles from dislodging. This would have cost only $100 a day. Ultimately, the decision to draw water from the Flint River was motivated by money troubles brought on by political pandering to municipal workers.

Generous pension obligations and retiree healthcare benefits consume a staggering 33 percent of Flint’s general fund spending. This figure will climb to 37 percent by 2020. Flint has about 1,900 former city workers, three times the number of current employees. Costly retirement benefits have squeezed spending on other services, resulting in penny-pinching on water.

Once a thriving city of 200,000 people in the 1960s, Flint has declined for 30 years amid spreading poverty, crime, and blight. Flint’s population is now only 99,000, with 40 percent below the poverty line.

From 2006 through 2011 when the financial emergency was declared, Flint lost 24 percent of its property-tax revenue, 31 percent of its income-tax revenue, and 13 percent of its state-shared revenue as people and companies such as General Motors moved out. The decision to switch to cheaper water was indirectly driven by sky-high retirement costs that devoured the city’s shrinking revenues.

Flint also illustrates that governments do a terrible job of repairing and upgrading infrastructure, whether it’s roads, bridges, schools, or water pipes. For example, a 2012audit revealed Philadelphia’s water utility loses nearly 40 percent of its water to leaks. Governments across the country have failed to make necessary investments, resulting in outdated pipes and contaminated water.

Regarding Flint, Michigan Gov. Rick Snyder admitted: “A lot of work is being done to even understand where the lead service lines fully are, so I would say any numbers you’re hearing at this point are still speculation.”

The locations of Flint’s lead service lines are kept on old index cards that have faded with time and can be difficult to read. Early estimates concluded it would cost Flint at least $60 million to replace these pipes.

Beyond botched financial decisions and incompetence, Flint also teaches a lesson in liability. If a private company had sold bottled water containing lead, lawsuits would hold it accountable and financially responsible. But as noted by Yale law professor Stephen L. Carter, the sovereign-immunity shield makes it nearly impossible to sue successfully any government water official or water agency for wrongdoing.

That is another reason water systems should be freed from government control. Keeping Flint’s water system in the hands of politicians who caused the problem is unacceptable. For a better solution, people should demand that private companies, not local and state governments, provide the water.

Studies show that private water companies invest heavily in modern pipes and improved water quality. Santiago, Chile, fully privatized its water system and, according to theWorld Bank, it resulted in an influx of private capital to fix the infrastructure and improve service to the poorest people.

Privatization led to huge increases in safe drinking water in Manila, Philippines; Buenos Aires, Argentina; El Alto, Bolivia, as well as in Chile, Cambodia, and Gabon. Child mortality fell in Buenos Aires, and access to safe water increased by five times in East Manila after privatization. About 73 million Americans rely on private water utilities. And all are more satisfied with their water service right now than Flint residents.

Only private water companies face strong incentives to invest in modern pipes and to properly maintain the system to provide reliable and safe water. For Flint and many other cities, privatization is the best solution going forward.