On Aug. 5, Environmental Protection Agency (EPA) workers inadvertently breached a wall of loose debris that was holding back a pool of mustard-hued wastewater from the abandoned Gold King Mine near Silverton, Colorado.

With a sudden gush, some 3 million gallons (about 11 million liters) of acidic, heavy-metal-laden water flooded into Cement Creek, a tributary of the nearby Animas River. From there, the plume headed downstream into the San Juan River (a major tributary of the Colorado River), headed for New Mexico and, eventually, Lake Powell on the Utah-Arizona border.

On the way, the plume traveled through Durango and Navajo Nation land in New Mexico, forcing warnings against touching the water, drinking it or using it for irrigation. The EPA is now scrambling to clean up the mess. [See Images of the Gold King Mine Spill]

But how do you clean up a river? The answer, according to the agency and an outside expert, is twofold: treatment and dilution.

Yellow waters
The Gold King Mine is one of an estimated 23,000 abandoned mines dotting the state of Colorado. Prospectors and mining companies dug gold-bearing ore and other precious metals out of the ground in the state for decades, but they had little responsibility for cleaning up after the mines closed. It wasn't until the federal Surface Mining Control and Reclamation Act passed in 1977 that mining operators had to create a plan for cleaning up defunct mines.

That act established funding for states to clean up long-abandoned mines, like the Gold King (which closed in the 1920s). But funds, drawn from taxes on coal-mining companies, are limited. The Colorado Division of Reclamation Mining & Safety gets about $2 million a year, and that amount has allowed the closing of 6,127 abandoned mine shafts in the state since 1980. But that state agency has almost no money for environmental remediation beyond simply closing entrances and preventing mine collapse. There have been previous efforts to turn the area around the Gold King Mine into a Superfund site, which would fast-track funds for the containment of any toxic waste. But local opposition sunk those plans. [8 of the World's Most Endangered Places]

Meanwhile, abandoned mines leak out toxic wastewater all over the state. The EPA was working at the Gold King Mine as part of an effort to slow acidic mine water that was leaking into Cement Creek from the Red and Bonita Mine farther down the mountain. The plan was to build a cement bulkhead to plug the leak, with pipes that would allow the slow release and treatment of water. Instead, the crew's machinery breached a debris wall that was holding back the nasty brew lurking in the Gold King Mine. 

The mine water is toxic because it contains dissolved pyrite, or iron sulfide, better known as fool's gold. The combination of iron sulfide, water and oxygen results in the formation of sulfuric acid.

"All you need is air and water" to create acid mine drainage, said Ron Cohen, a professor of civil and environmental engineering at the Colorado School of Mines who has been involved in mine remediation internationally.

This acidic water then leaches heavy metals — such as zinc, lead and cadmium — from the ground. Arsenic levels also spiked after the mine blowout to more than 25 times the state limit for water safety. The mustard-yellow color of the water is caused by oxidized iron, Cohen said — similar to the rust on an old nail.

"The old-timers used to call it 'yellow boy,'" he said.

Cleaning up the spill
The EPA's emergency cleanup is a quick version of typical mine treatment. According to news releases, the agency has excavated four holding ponds below the mine breach. Crews are treating the water in these ponds with caustic soda (sodium hydroxide) and lime (calcium oxide), which are very basic in pH. The goal is to reduce the acidity of the water.

"When the water is rather basic in nature, considerably above pH 7 [neutral], most of your metals will come out of the] solution," Cohen told Live Science.

This process is often visible, Cohen said. Seemingly clear water will turn cloudy as the dissolved metals settle out.

The sludge left behind can be stripped of water and disposed of, Cohen said. Once they're not in their dissolved form, the metals are far less toxic to the environment.

On Aug. 10, the EPA reported that the water released from its treatment ponds was cleaner and less acidic than the water in Cement Creek had been even before the spill. The agency did not respond to requests for comment.  

Time and dilution
The EPA and other agencies are monitoring wildlife and testing water quality downstream from the mine, all the way into New Mexico. The good news, Cohen said, is that dilution and time will likely go a long way toward mitigating the long-term consequences of the spill.

Three million gallons of water (which spilled out of the mine) equals approximately 400,000 cubic feet. That's no small amount, but about 8 million cubic feet of water flows through Cement Creek each day, Cohen said. As the contaminated water flows into larger and larger bodies of water, it will become increasingly diluted. Lake Powell currently holds about 560 billion cubic feet of water.  

However, that dilution doesn't negate the ongoing challenges caused by Colorado's abandoned mines, which tend to wreak environmental havoc on their own. Many leak constantly at low levels, or release toxic waste during the spring melt each year. Others occasionally put out large pulses of contamination. In 2009, thousands of gallons of bright-orange mine waste poured into Clear Creek, west of Denver. Similar spills have happened at the California Gulch Superfund site near Leadville, Colorado, and at the Summitville Mine near Del Norte, Colorado. [10 of the Most Polluted Places on Earth]

"We've had many of these spills without the EPA's help," Cohen said. Many of the mines closed nearly a century ago, leaving no one to hold responsible for the mess.

"There is a real limitation due to resources — both human resources and money resources — to be able to go after these sites aggressively," Cohen said.

Copyright 2015 LiveScience, a Purch company. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.