The Environmental Protection Agency is warning residents to keep away from a river in Colorado after accidentally spilling mine waste water into it.

The EPA was investigating the abandoned Gold King Mine on Wednesday together with the state Division of Reclamation, Mining and Safety, when they triggered the release of the waste into Cement Creek, a tributary of the Animas River in San Juan County.

Ironically, the initial goal was to find a safe way to pump out the wastewater and treat it.

EPA accidentally spills millions of gallons of #wastewater, turning river orange http://t.co/esvkSaK9Y1pic.twitter.com/i7f5pww9Dr — Acre (@acre) August 7, 2015

Some one million gallons of wastewater is estimated to have been discharged during the incident. The spill turned water in the river bright orange.

Local residents were advised to cut back on water use and keep away from the contaminated river until officials give it the all clear.

"The primary environmental concern is the pulse of contaminated water containing sediment and metals flowing as an orange-colored discharge downstream," said EPA spokesman Rich Mylott.

EPA accidentally caused a massive waste spill that turned this River in Colorado Orange> http://t.co/34bM4VZqmkpic.twitter.com/JLmcNsmT8h — Earthjustice (@Earthjustice) August 6, 2015

By Thursday, the spill had made its way to La Plata County and the city limits of Durango, the local Durango Herald reported. The city was forced to stop pumping river from the water and close it for public use.

City residents were asked to conserve water from the local reservoir, which cannot be refilled with the Animas River now under quarantine. However, no formal water restrictions were issued.

The EPA expects the first results of the tests to come out on Friday. They will show whether the waste has passed and poses no risk to aquatic life or water users.