According to the Casper Star Tribune, the documentation to formalize the agreement was filed February 9 in the Missouri bankruptcy court where Arch’s case is being processed. Wyoming will now be a priority creditor, allowing it to collect some of Arch’s obligations as needed.

Previously, the agreement between the company and the DEQ outlined that it wouldn’t need to post bond for its assets in Wyoming so long as it could present proof of its ability to cover any potential reclamation costs.

Arch then confirmed it filed for Chapter 11 protection on January 11, leading to a U.S. Office of Surface Mining Reclamation and Enforcement (OSMRE) probe into its reclamation status with the state agency.

Earlier this month, the DEQ requested additional time to complete its investigation of Arch; the OSMRE responded by extending its February 1 deadline to February 22.

DEQ spokesman Keith Guille said the agreement will allow the company’s mines to stay open and to continue ongoing reclamation efforts. “Being able to enter into this agreement is positive for all of Wyoming, and its taxpayers and the environment,” he said.

One of Arch’s flagship operations, also one of the largest mines in the world, is the Black Thunder surface complex in Wright, Wyoming. The Powder River Basin mine began operations in 1977 sold about 101.2 million tons in 2014.

Approval of the deal by a U.S. Bankruptcy Court judge is still pending, the Star Tribune said.