Deep inside a complex of huge tanks, drinking water for Iowa's capital city is constantly cleansed of the harmful nitrates that come from the state's famously rich farmland.

Without Des Moines Water Works, the region of 500,000 people that it serves wouldn't have a thriving economy that has become a magnet for tech companies such as Microsoft. But after decades of ceaseless service, the utility is confronting an array of problems: Water mains are cracking open hundreds of times every year. Rivers that provide its water are more polluted than ever. And the city doesn't know how it will afford a $150 million treatment plant at a time when revenues are down and maintenance costs are up.

"We're reaching the end of the life cycle of some of the most critical assets we've got," said Bill Stowe, CEO and general manager of the utility, which has a downtown treatment plant that was built in the 1940s, long before nitrates, which can harm infants, became a pressing concern. He said the industry is getting "all kinds of these warning alarms that we haven't heard before."

A similar crisis is unfolding in cities across the country. After decades of keeping water rates low and deferring maintenance, scores of drinking water systems built around the time of World War II and earlier are in need of replacement. The costs to rebuild will be staggering. The costs of inaction are already piling up. The challenge is deepened by drought conditions in some regions and government mandates to remove more contaminants.

At stake is the continued availability of clean, cheap drinking water — a public health achievement that has fueled the nation's growth for generations and that most Americans take for granted.

See also: How access to clean water differs for families across the world

The U.S. Environmental Protection Agency projects that it will cost $384 billion over 20 years to maintain the nation's existing drinking water systems, which will require tens of thousands of miles of replacement pipe and thousands of new or renovated plants. The American Water Works Association, an industry-backed group, puts the price even higher — $1 trillion to replace all outdated pipes and meet growth over the next quarter-century.

"The future is getting a little dark for something as basic and fundamental as water," said Adam Krantz of the Water Infrastructure Network, a lobbying group that is fighting cuts to key federal water programs.

People work on a barge used to remove a plug on a new water intake on Lake Mead near Boulder City, Nevada.

A hidden crisis

Unlike pothole-scarred roads or crumbling bridges, decaying water systems often go unnoticed until they fail.

"Buried infrastructure is out of sight, out of mind. We take it for granted. We turn on the faucet and we get good, clean, quality water," said Will Williams, head of asset management for the engineering firm Black & Veatch and an expert on water infrastructure.

When failures happen, help can be hard to come by.

Without big changes in national policy, local governments and their ratepayers will be largely on their own in paying for the upgrades. The amount of federal money available for drinking-water improvements is just a drop in the bucket.

Cities and utilities have historically been reluctant to raise rates sharply or to incur high levels of debt to pay for them, although both are increasingly happening.

"That's the key that Americans have to understand: If they want this system, they are going to have to be willing to finance it, to pay for it," said Greg DiLoreto, past president of the American Society of Civil Engineers.

The group's 2013 report warned of a looming funding crisis and a future with more equipment failures that will disrupt water service, transportation and commerce.

"Not meeting the investment needs of the next 20 years risks reversing the environmental, public health and economic gains of the last three decades," the report said.

The largest source of federal assistance is the Drinking Water State Revolving Fund, which goes largely to small towns and mid-sized cities. Some communities that need the most help shun the program because it offers mostly loans, not grants. A new program authorized by Congress to attract private investment in larger, big-city projects has yet to get off the ground.

The importance of pipes

More than a million miles of underground pipes distribute water to American homes, and maintaining that network remains the largest and costliest long-term concern.

Some pipes date back to the 1800s. As they get older, they fail in different ways. Some split and rupture, with an estimated 700 main breaks occurring around the U.S. every day. The most devastating failures damage roadways, close businesses and shut off service for hours or days. If pipes are particularly bad, they can contaminate water.

Utilities have long struggled to predict when to replace pipes, which have vastly different life cycles depending on the materials they are made from and where they are buried. Some might last 30 years, others more than 100. Sophisticated computer programs are helping some water systems prioritize the order in which pipes should be replaced, but tight budgets often mean the fixes don't come until it's too late.

Replacing a single mile of water main can cost from $500,000 to more than $1 million, but doing so is far more disruptive to customers if it fails first. Experts say a peak of up to 20,000 miles of pipe will need to be replaced annually beginning around 2035, up from roughly 5,000 miles currently. Des Moines Water Works alone has 1,600 miles of distribution pipes.

The Philadelphia water department, the nation's oldest, is already spending tens of millions of dollars more per year to replace its worst pipes. Yet the city saw more than 900 water main breaks in the most recent budget year. In June, two massive breaks forced evacuations and damaged cars, homes and businesses.

A man is brought across a flooded parking lot in a shopping cart in Philadelphia after a water main rupture in the city's Hunting Park section. Image: Matt Rourke/Associated Press

New Orleans once boasted about not raising water rates for two decades. But in 2012, the city approved 10 percent increases on water bills for eight straight years as part of a plan to fix a crumbling system. The average household's monthly water-and-sewer bill will climb to $115 by 2020. The extra money will help replace deteriorating mains damaged by Hurricane Katrina.

The massive main break that flooded the UCLA campus in Los Angeles in 2014 — ruining its basketball court and inundating buildings and fields with millions of gallons of water — was widely seen as a wakeup call for failing infrastructure. But a year later, the city's response illustrates how large of a problem many systems face.

The Los Angeles Department of Water and Power is moving from a 300-year replacement cycle to a 250-year cycle for its 7,200-mile water distribution system, still far slower than the 100-year cycle many experts recommend. The department is proposing a 3.8 percent annual water rate increase for five years, which would go largely toward system improvements and gradually raise the typical household water bill by $12.30 per month. Heavier users would face steeper increases.

More unavoidable costs

Pipes aren't the only components in need of big investments. Many water-treatment plants are 70 to 100 years old and need to be replaced or rebuilt with new systems at a cost of tens of millions of dollars even in small cities. Adding to the price will be new valves to control water flow, new pumping stations to keep up pressure and new tanks to store water.

To make matters worse, the need for new investment comes as revenue is falling, in large part because Americans are using less water and installing more efficient toilets and showerheads.

Many households affected by drought have cut their usage, either voluntarily or because of mandatory orders. Even after the drought ends, their old habits often never return. That is good for conservation but means less money for water systems, which charge customers based on the amount used.

Jason Dadakis of the Orange County Water District talks about the water filtration system at their water treatment plant in Fountain Valley, California. Image: Chris Carlson/Associated Press

To deal with the loss of income, many water districts have been forced to raise rates. So in essence, customers are paying more for using less.

Some big cities and small towns are losing residents too, further contributing to the declining number of paying water customers.

Costs are also rising to accommodate federal regulations that require removal of more potentially harmful contaminants, including arsenic and disinfectant byproducts.

Add it up, and customers' water bills will need to climb rapidly across the country to keep the current level of service. Experts say the trend, which will disproportionately hurt the low-income, is likely to continue in coming decades.

"Infrastructure is the new frontier. Everybody knows there are issues, but it's like, 'What are we going to do?'" said Ed Moreno, water superintendent in Iowa City, where rates went up 5 percent this year to pay for infrastructure. "Because it's not going to be inexpensive."

The dilemma in Des Moines

Many of these pressures are on stark display in Des Moines, where the decaying infrastructure is contributing to a planned rate hike for customers of about 10 percent for next year.

The biggest challenge for Des Moines Water Works has been nitrate levels that are far above the federal standard for safety in the two rivers that provide the utility's source water. The utility and scientists argue that the nitrates are largely the result of farm runoff that is tainted with fertilizer and manure.

Cleaning the water is expensive because nitrates are not addressed in the normal treatment process. Instead, the utility has to operate a separate nitrate-removal system, which recently ran a record 148 straight days this year at a cost of $1.5 million because of continued high levels in the Raccoon and Des Moines rivers.

The water agency has taken the unprecedented step of suing three major Iowa farming counties in federal court to try to limit the farm discharges. But the litigation provoked an intense backlash from Iowa's powerful agricultural industry, which argues that farmers are already taking voluntary measures to address the problem. A trial is set for next year.

If the problems persist, the plant's general manager said it will have to spend $150 million to build a nitrate-removal plant to replace the aging tanks and outdated technology currently in use. Officials worry that on a hot summer day during peak demand, the utility will be unable to treat enough water, forcing a temporary shutdown that would require customers to use bottled water. The existing nitrate-removal system can treat only about 10 million gallons a day, a fraction of what the region needs.

The treatment costs also leave less money to replace Des Moines' aging pipes. The utility budgeted this year for 345 main breaks, up from 285 last year. It spends about $6 million per year on maintenance, a figure Stowe said is less than half the amount needed.

The effects are felt by residents such as Mario Tumea, whose family's Italian restaurant was closed in May for a day and a half after a 12-inch cast-iron main from 1938 split and sent water gushing into the street. The restaurant's parking lot was damaged, and eight businesses were left without water.

"It's frustrating," he said. "But when you have old pipes and stuff like that, it's going to happen. We weren't happy with it, but we had no choice."