The U.S. Environmental Protection Agency (EPA) has pledged to find out exactly what went wrong during work at an abandoned gold mine last week, which caused more than 3 million gallons of potentially toxic wastewater to spill into a tributary of the Animas River, according to the agency’s website.

The incident on August 5 was triggered by work being done by EPA contractors at the Gold King Mine north of Durango in Colorado. Workers were using heavy equipment to enter the mine to begin the process of pumping and treating the contaminated water inside. However, the crew accidentally breached a debris dam that had formed inside the mine, releasing polluted sludge that turned the river water orange and yellow.

EPA Administrator Gina McCarthy on Tuesday described the breach as “a tragic and unfortunate incident” and said the agency was taking responsibility to ensure it is cleaned up.

“EPA has taken steps to capture and treat the discharge at the Gold King mine, addressing the risk of additional downstream impacts. We have constructed four ponds at the mine site which are treating water by lowering acidity levels and removing dissolved metals,” McCarthy explained.

“We have also stood up a Unified Command center in Durango, as well as the Emergency Operations Center at EPA headquarters in DC to ensure a seamless coordinated response in conjunction with local, state and federal officials,” McCarthy said.

“Working with local officials, EPA is providing alternative water supplies and free water quality testing for domestic drinking water wells along the river. We have been in touch with the state leadership, as well as the Congressional delegations, and we have kept the White House informed.”

On Monday, Colorado Governor John Hickenlooper declared a state of disaster emergency due to the incident and its impact on downstream waters. The Executive Order allocates $500,000 from the state’s Disaster Emergency Fund to pay for the response and technical assessments.

“Our priority remains to ensure public safety and minimize environmental impacts,” Hickenlooper said. “By declaring a disaster emergency, we are able to better support impacted businesses and communities with state resources. We will work closely with the EPA to continue to measure water quality as it returns to normal, but also to work together to assess other mines throughout the state to make sure this doesn’t happen again.”