The tap water serving Jim Hagen and his neighbors on his south Minneapolis street used to turn rusty and orange, staining plumbing fixtures and filling water heater tanks with crud.

The culprit was a "dead leg," a pipe at the end of a water main that led nowhere. Years of complaints from residents on the street finally prodded the city to disconnect the pipe and end the flow of discolored water a few weeks ago. Now, Hagen wants to ensure the city takes care of the rest of the 400 or so water main dead ends across Minneapolis.

The city regularly meets federal water quality rules and hasn't detected a contaminant above federal limits at least back to 2019, according to its annual consumer confidence reports. But Hagen said he worries other neighborhoods may have issues similar to those of his street.

"We're trying to basically change the city policy so that it would catch blocks like ours," he said.

Hagen, a semiretired professor who focuses on business ethics and systemic inequality, has lived near the intersection of 47th Avenue S. and Dowling Street since 2009. It's one of the areas in the city where an underground main dead ends and where water might not circulate as often. The longer water doesn't flow, the more opportunity there is for bacteria to grow.

A corrosive bacteria was the villain in the pipe beneath 47th Avenue, eating away at the century-old cast iron and creating orange residue that sometimes became dislodged. Though the iron deposits could create a mess, they alone didn't make the water unsafe to drink.

The problem was worse at this location because of the dead leg, the roughly 9-foot segment of pipe that extended underground past the hydrant at the end of the street.

Annika Bankston, director of water treatment and distribution for the city, said the system may have been built with these dead-end pipes in the expectation that development would continue into another block or to avoid a "water hammer," which occurs when rushing water hits an angle in the pipe with enough force to damage it.

Water systems across the country regularly add extra disinfectant, such as chloramine, to stop dangerous bacteria from sneaking into the system between the treatment plant and homes. It can be a challenge to find the right balance — enough disinfectant to keep water clean, but not so much that chemical byproducts remain.

In Hagen's neighborhood, the spur at the end of the dead-end main wasn't just helping iron bacteria thrive. Because it was a fertile area for bacteria, it had become a "sink" that was quickly burning through disinfectant, Bankston said.

Minneapolis had been trying to address the orange water issue for years, first by flushing the hydrant at the end of the street and then by installing a low-flow system to periodically drain the hydrant without stirring up iron residue, Hagen said.

He said it took "a great deal of pestering by the neighbors" to get the city to test the tap water of nearby homes to determine its level of disinfectant.

Data obtained from the city through a public records request revealed that workers had tested for disinfectant a few times in 2019 and 2020. More tests conducted starting in mid-September of this year found the total chlorine levels inside homes was plummeting.

On Sept. 19, water utility officials arrived on the block and separated the extra spur of bacteria-laden main. On Nov. 3, they returned to clean the rest of the water main and line it with concrete to stop rusty water from forming again.

Bankston said the city regularly tests flow rates when it flushes hydrants — an indicator of whether iron deposits have built up and started to block a pipe. She also said 16 miles of underground pipe were cleaned and lined with concrete this year, and the city plans to clean out the same amount next year.

But the priority for that program is making sure each hydrant gets enough flow for fire suppression, Bankston said.

And while the city knows where water mains reach a dead end — some of these areas have already been lined with concrete — it's less clear how many dead ends include an additional leg, as on Hagen's street.

It's also expensive to fix them. The work on 47th Avenue cost almost $33,000, said Matt Croaston, a spokesman for the water utility.

"If I could send everybody out in the next two months and cut off all [the dead legs], I would do it, but that's part of the challenge of resource management," Bankston said.

Hagen said he still plans to push the city to do more hydrant flushing and water quality testing. But he and his neighbors, who also pushed city officials to examine the water system, did take time to celebrate their cleaned-up water main.

A few days after the city's work was done, they gathered in the middle of 47th Avenue — toasting each other with glasses of clear tap water.