U.S. shale producer Coterra Energy pleaded no contest for contaminating well water in Dimock, Pennsylvania, and will pay $16.29 million to construct a new means of water supply to its residents, the state attorney general said on Tuesday.

The Houston-based company, formerly known as Cabot Oil and Gas, will also make 75 years of water bills payments for the impacted residents, who were exposed to drinking water polluted with metals and high levels of methane.

“Under this historic settlement, Coterra will now pay to build a new public water line that will provide clean, reliable drinking water for generations to come,” said Attorney General Josh Shapiro.

Coterra took full responsibility for the environmental crimes committed, Shapiro said, adding that the agreement brought justice to the residents of Dimock, “who for years had been ignored.”

The attorney general charged Coterra in 2020 after a grand jury investigation showed that drilling unconventional gas wells by the company had been responsible for methane pollution in the local water supply.

Dimock was at the heart of the Marcellus Shale gas fracking boom that began in 2007. Residents complained that Cabot’s drilling caused methane gas to seep into their wells, to the extent that the contaminated water even caught fire.

Coterra did not immediately respond to a request for comment.