Agreeing to set aside at least $150 million to pay for damages after an acid spill from the Buenavista mine, Grupo Mexico will now contend with Mexico’s worst mining-related environmental disaster. The company, according to the Wall Street Journal, reached an agreement with Mexico’s government to create a trust to pay for any environmental and human damage caused by the spill, according to government officials.

The decision enables the Mexican government to avoid a lengthy legal process and gets financial resources from the company to the region as quickly as possible.

“The company totally accepted the requests made by the government,” said Economy Minister Ildefonso Guajardo at a news conference.

The August 6 spill of 40,000 cubic meters of copper sulfate acid solution from the Buenavista mine in the northwestern state of Sonora contaminated two rivers and left thousands of residents without clean water. “This is the worst natural disaster provoked by the mining industry in the modern history of Mexico,” said Mexican Environment Minister Juan José Guerra Abud. PROFEPA, the Mexican environmental protection agency, said the mine’s leach solution yard is where the spill originated and ordered it partially shut, citing “imminent risk to the environment.”

The Buenavista mine, about 25 miles south of Mexico’s border with Arizona, produces 200,000 tons of copper a year, making it the world’s fourth largest copper mine by output. Grupo Mexico, controlled by Mexican billionaire German Larrea, produced 55% of Mexico’s copper last year. The company also has operations in the U.S. and Peru.