In a door-knocking sweep reminiscent of the movie "Erin Brockovich," officials in Randall, Minn., visited every household in town last month, warning families about poison in their water supply.

Exceedingly high nitrate levels had turned up in one of Randall's two municipal wells, and all 637 people in the north-central Minnesota community received boldface notices that infants were at risk of a potentially fatal blood condition. The well was no good, they learned, and the town would have to buy a new one.

"I was shocked," said Joseph Ellis, a Randall resident. "We don't drink this water anymore."

Randall's water emergency is the latest sign of an environmental problem in Minnesota. Nitrogen fertilizer is leaching into groundwater from farm fields, contaminating wells and costing taxpayers millions of dollars a year. Sixteen communities have violated the state health limit for nitrates, and half have installed expensive nitrate-removal systems at a cost per household of $3,300 or more.

Communities are spending even more money to keep local nitrate levels in check. More than 45 of them are working with the state Department of Health to slow or reverse nitrate pollution in their public water systems, including towns that bought out nearby farmers to remove cropland from atop their well fields.

In addition, the Health Department annually finds violations of the nitrate standard in "non-community" well systems like schools, resorts and highway rest areas. Last year alone, 14 of those places exceeded the nitrate limit.

In about one community a year, as in Randall, mitigation efforts fail.

"It's frustrating, but it's become part of the cost of operation," said Pete Moulton, public works director in St. Peter, one of the eight communities running nitrate-removal plants.

Roughly three out of four Minnesotans live in communities served by well water, and the Minnesota Department of Health will emphasize the nitrates problem in its upcoming Drinking Water Protection Annual Report. Agency officials say nitrates afflict a significant number of the state's 729 municipal well systems serving towns, cities and mobile home parks.

Meanwhile, the Minnesota Department of Agriculture this month is rolling out a new nitrogen management plan for farmers, the latest attempt to solve a pollution problem now 40 years old.

Chemical cocktail?

For decades, federal law has limited nitrates in Minnesota's drinking water to no more than 10.4 parts per million. Besides causing a condition called Blue Baby Syndrome, which reduces oxygen supply in the blood of infants under 6 months, the National Cancer Institute has suggested a link between elevated nitrate levels in drinking water and an increased risk of non-Hodgkin's lymphoma.

Some communities are worried about pesticides as well. While state regulators have not detected pesticides in public-service wells, some groundwater experts like Barry Schade contend that elevated nitrate levels can signal the presence of pesticides and their breakdown products, at least in private wells. Schade oversaw a four-year study of water quality in private wells in Dakota County while he was the county's director of environmental management.

"If they are drinking water contaminated at all by agriculture nitrates, chances are good they are also drinking a cocktail of agricultural pesticides," Schade said.

When nitrate levels reach just 3 parts per million in a community's drinking water, the Health Department will offer help devising a prevention plan, said Karla Peterson, supervisor of the department's Community Public Water Supply Unit. She said it's hard to say if the problem is increasing or decreasing in Minnesota.

"I think we are really kind of at the early stages of figuring out what the trends are," said Kimberly Kaiser, a hydrologist with the state Agriculture Department.

With the 2015 nitrogen management plan, Kaiser hopes to dissect water quality in tens of thousands of private wells to understand contamination trends down to the township level. That could result in location-specific nitrogen restrictions on farmers. For example, in karst regions where thin soil overlays highly permeable rock, officials foresee a ban on fall fertilizer applications.

Buying out farmers

For now, Minnesota towns and cities are coming to grips with the problem individually, sometimes with state or federal financial help. In the past five years, state agencies have issued more than $12 million in loans and grants to address nitrate-driven drinking water problems. The U.S. Department of Agriculture also provides loans and grants, but the agency could not say how many have been related to high nitrates.

In extreme southwestern Minnesota, Lincoln-Pipestone Rural Water has been fighting nitrates since the 1990s and now faces a new expense. Its nitrate-removal system cleans the local drinking water but produces its own contaminated effluent, which until now has been dumped raw into Pipestone Creek. The Minnesota Pollution Control Agency is demanding action on that secondary problem, which could cost $2 million to $4 million, according to Jason Overby, operations manager for the water system.

In Park Rapids, where potatoes and other crops grow nearby on irrigated, sandy soil, state health officials declared violations of the nitrate limit in two separate municipal wells in 2009 and 2010. Those wells have been shut down, but the city received a $2 million state loan and grant package to dig a new, deeper well that requires removal of iron and manganese.

Altogether, efforts to clean nitrate from public water supplies cost Minnesotans about $3 million per year, according to a previously unreleased study by researchers at the University of Minnesota. The study, completed in December, was commissioned by the nonprofit Minnesota Center for Environmental Advocacy.

"There's some pretty significant public costs here if we are not careful with our nitrogen fertilizer," said Bruce Montgomery, who heads the Agriculture Department's pesticide and fertilizer division.

There's broad agreement that preventing nitrate contamination is cheaper than removing it from water or drilling new wells. But so-called wellhead protection plans, like a successful effort in Perham, also can be costly. The west-central Minnesota city has spent $856,000 to buy 285 acres of farm property, recouping some of the expense via new housing on some of the land.

A similar approach in Worthington has cost the city and its partners $2 million since 2006 to set aside 520 acres of farmland for conservation in a drinking water protection area. The community bought a 150-acre parcel just last year and reopened it as the Worthington Wells Wildlife Management Area, which was dedicated during the governor's pheasant-hunting opener.

Nitrate contamination has even surfaced close to the Twin Cities, in Hastings, where nitrate concentrations in two wells approached the safe drinking water standard. In 2010, the city opened a treatment plant for water from those wells and now blends it with water from cleaner wells to create a safe supply.

If Hastings is the biggest community with a nitrate problem, Sundsrud Mobile Home Park on the fringe of Park Rapids is the smallest.

With only 16 lots, the park is paying for reverse-osmosis equipment to remove nitrates that once spiked to nearly 40 parts per million. Greg Peterson, who owns the park with his wife, JoAnn, said it's a sobering responsibility.

"When you are a community water source … that's what you take on."

Tony Kennedy • 612-673-4213