An Exxon Mobil Corp. subsidiary today agreed to settle charges it violated the Clean Water Act, pledging to spend about $20 million to better manage wastewater pollution from its fracking operations in Pennsylvania and West Virginia.

The U.S. Environmental Protection Agency and the Department of Justice alleged that XTO Energy Inc. in November 2010 discharged wastewater contaminated with pollutants including chlorides, barium, strontium, and total dissolved solids from an open valve from inter-connected tanks at a facility in Penn Township, Pa. Pollutants from the release were found in a tributary of the Susquehanna River basin.

Under the settlement, the company will pay a $100,000 fine and spend an estimated $20 million to better recycle and properly dispose of its wastewater, as well as taking steps to prevent future spills. This includes installing a continuous remote monitoring system, complete with alarms if something goes wrong.