Denver • Crumbling mine tunnels awash with polluted waters perforate the Colorado mountains, and scientists may one day send robots creeping through the pitch-black passages to study the mysterious currents that sometimes burst to the surface with devastating effects.

One such disaster happened at the inactive Gold King Mine in southwestern Colorado in 2015, when the Environmental Protection Agency accidentally triggered the release of 3 million gallons (11 million liters) of mustard-colored water laden with arsenic, lead and other contaminants. The spill tainted rivers in three states.

Now, the EPA is considering using robots and other sophisticated technology to help prevent these types of “blowouts” or clean them up if they happen. But first the agency has to find out what’s inside the mines, some of which date to Colorado’s gold rush in the 1860s.

Wastewater containing toxic heavy metals has been spewing from hundreds of inactive mines nationwide for decades, the product of complicated and sometimes poorly understood subterranean flows.

Mining creates tainted water in steps: Blasting out tunnels and processing ore exposes long-buried, sulfur-bearing rocks to oxygen. The sulfur and oxygen mix with natural underground water flows to create sulfuric acid. The acidic water then leaches heavy metals out of the rocks.

To manage and treat the wastewater, the EPA needs a clear idea of what’s inside the mines, some of which penetrate thousands of feet into the mountains. But many old mines are poorly documented.

Investigating with robots would be cheaper, faster and safer than humans.

“You can send a robot into an area that doesn’t have good air quality. You can send a robot into an area that doesn’t have much space,” said Rebecca Thomas, project manager for the EPA’s newly created Gold King Superfund site, officially known as the Bonita Peak Mining District.

Instruments on the robots could map the mines and analyze pollutants in the water.

They would look more like golf carts than the personable robots from “Star Wars” movies. Hao Zhang, an assistant professor of computer science at the Colorado School of Mines, envisions a battery-powered robot about 5 feet (1.5 meters) long with wheels or tracks to get through collapsing, rubble-strewn tunnels.

Zhang and a team of students demonstrated a smaller robot in a mine west of Denver recently. It purred smoothly along flat tunnel floors but toppled over trying to negotiate a cluttered passage.

“The terrain is pretty rough,” Zhang said. “It’s hard for even humans to navigate in that environment.”

A commercial robot modified to explore abandoned mines — including those swamped with acidic wastewater — could cost about $90,000 and take three to four years to develop, Zhang said.

Significant obstacles remain, including finding a way to operate remotely while deep inside a mine, beyond the reach of radio signals. One option is dropping signal-relay devices along the way so the robot stays in touch with operators. Another is designing an autonomous robot that could find its own way.

Researchers also are developing sophisticated computerized maps showing mines in three dimensions. The maps illustrate where the shafts intersect with natural faults and provide clues about how water courses through the mountains.

“It really helps us understand where we have certainty and where we have a lot of uncertainty about what we think’s happening in the subsurface,” said Ian Bowen, an EPA hydrologist. “So it’s a wonderful, wonderful tool.”

The EPA also plans to drill into mines from the surface and lower instruments into the bore holes, measuring the depth, pressure and direction of underground water currents.

Tracing the currents is a challenge because they flow through multiple mines and surface debris. Many tunnels and faults are connected, so blocking one might send water out another.

“You put your finger in the dike here, where’s the water going to come out?” Thomas said.

Once the EPA finishes investigating, it will look at technologies for cleansing the wastewater.

Options range from traditional lime neutralization — which causes the heavy metals dissolved in the water to form particles and drop out — to more unusual techniques that involve introducing microbes.

The choice has consequences for taxpayers. If no company is found financially responsible, the EPA pays the bill for about 10 years and then turns it over to the state. Colorado currently pays about $1 million a year to operate a treatment plant at one Superfund mine. By 2028, it will pay about $5.7 million annually to operate plants at three mines, not including anything at the Bonita Peak site.

The EPA views the Colorado project as a chance for the government and entrepreneurs to take risks and try technology that might be useful elsewhere.

But the agency — already dealing with a distrustful public and critical politicians after triggering the Gold King spill — said any technology deployed in Colorado will be tested first, and the public will have a chance to comment before decisions are made.