The Monsanto agricultural products company has agreed to pay $52 million to the District over the company’s alleged role in the contamination of the Potomac River and other local waterways for nearly 50 years during the 20th century, the office of D.C. Attorney General Karl A. Racine announced Friday.

The city’s lawsuit against the agribusiness giant, filed in D.C. Superior Court in May, was part of court actions around the country related to Monsanto’s production and sale of products that contained polychlorinated biphenyls (PCBs).

The company, now owned by Bayer, continued that practice between the 1920s and the late 1970s, the District’s lawsuit said, despite knowing the chemicals could end up in nearby waterways, kill local wildlife and cause significant health problems in people, including cancer and liver damage.

“This settlement holds Monsanto accountable for polluting the District’s environment for decades and requires it to pay to clean up the toxic PCB contamination of our land, wildlife, and waters,” Racine said at a news release.

“The Office of the Attorney General will not tolerate companies putting the health of our residents or natural resources at risk, nor will we allow polluters to avoid responsibility for breaking the law,” he said.

Bayer announced the settlement in June as part of agreements, amounting to at least $10.1 billion, aimed at resolving outstanding legal disputes initiated before the company took over Monsanto in 2018.

“We believe the resolution of the PCB matters we previously announced on June 24 with D.C., state AGs and municipalities is fair,” the company said Friday in a statement.

“To be clear, Monsanto legally manufactured PCBs until voluntarily ceasing their production in 1977, two years before the EPA banned its manufacture, and the company never manufactured or disposed of PCBs near or in any D.C. waterways,” Bayer said.

The settlement in the District was finalized Thursday, Racine’s office said.

Most of the $52 million will go toward cleaning up the high levels of PCB contamination that remain in the Potomac and Anacostia rivers, plus dozens of small creeks and streams, Racine’s office said. The remainder will go toward legal fees and the District’s general fund budget, the attorney general’s office said.