Tom Casey, CEO of titanium dioxide producer Tronox, speaks during an interview in New York in September 2012. (Brendan McDermid/Reuters)

The Justice Department reached the biggest environment settlement in history Thursday, securing a $5.1 billion deal with Anadarko Petroleum Corp. to resolve claims that one of its subsidiaries, Kerr-McGee, is liable for both a massive cleanup at dozens of sites across the U.S. and compensation for those living nearby.

The accord resolves a long-running dispute over the environmental legacy of Tronox Inc., a paint materials manufacturer that went bankrupt. While the actions took place long before Anadarko acquired Tronox's parent company Kerr-McGee in 2006, Anadarko agreed to the historic settlement to reassure jittery investors.

In December, U.S. bankruptcy Judge Allan Gropper said Kerr-McGee acted "with intent to hinder" when it spun off Tronox in 2005. Shareholders appeared relieved at news of a deal: At 3 p.m., the company's stock was at $97.66 a share, up nearly 13 percent.

The agreement will provide a new source of funds to clean up contaminated sites from Oklahoma to Pennsylvania.

"This settlement agreement with the Litigation Trust and the U.S. Government eliminates the uncertainty this dispute has created, and the proceeds will fund the remediation and cleanup of the legacy environmental liabilities and tort claims,” said Anadarko Chairman and CEO Al Walker in a statement. “Investor focus can now return to the tremendous value embedded in Anadarko’s asset base, allowing our peer-leading operational and exploration results to again become the basis for valuation."

"We are grateful to our stakeholders who have maintained their confidence and trust in our people and our assets,” Walker added.

Environmental Integrity Project director Eric Schaeffer, who led EPA's Office of Civil Enforcement from 1997 to 2002, said in an interview that the settlement was "great news" because it would make major companies take the financial implications of their actions more seriously. He noted that as a federal enforcement official, he envied the Securities and Exchange Commission for the huge legal settlements it could reach with Wall Street firms.

"I’ve always been frustrated that environmental violations haven’t been valued and weighted in the same way," he said.