TOLEDO, Ohio — Standing at the edge of the Great Lakes, the world’s largest surface source of fresh water, this city of 280,000 seems immune from the water-supply problems that bedevil other parts of the country. But even here, the promise of an endless tap can be a mirage.

Algae blooms in Lake Erie, fed by agriculture runoff and overflowing sewers, have become so toxic that they shut down Toledo’s water system in 2014 for two days. The city is considering spending millions of dollars to avoid a repeat.

Similar concerns about water quality are playing out elsewhere. Farm fertilizers, discarded pharmaceuticals, industrial chemicals and even saltwater from rising oceans are seeping into many of the aquifers, reservoirs and rivers that supply Americans with drinking water.

Combating these growing threats means cities and towns must tap new water sources, upgrade aging treatment plants and install miles of pipeline.

Consider tiny Pretty Prairie, Kansas, where the water tower and cast-iron pipes need to be replaced and state regulators are calling for a new treatment plant to remove nitrates from farm fertilizers. The fixes could cost the town’s 310 water customers $15,000 each.

Emily Webb never gave a second thought to the town’s water until she became pregnant almost two years ago. That’s when she learned through a notice in the mail that the water could cause “blue baby” syndrome, which interferes with the blood’s ability to carry oxygen.

“It just kind of scared me,” she said. “Now we don’t drink it at all.”

Instead, she and her husband stock up on well water from her parents’ home and buy bottled water even though health officials say the risk is limited to infants. When it comes time to buy their first home, she said, they will look somewhere else.

Across the country, communities are debating how much they can afford to spend to make contaminated water fit for drinking.

– The Associated Press