In this 1953 photo, Navajo miners work at the Kerr-McGee uranium mine on the Navajo reservation in Cove, Ariz. Kerr-McGee abandoned uranium mine sites, leaving contaminated waste rock piles, in the Lukachukai mountains of Arizona and in the Ambrosia Lake area of New Mexico. (AP)

The Justice Department announced the biggest environmental cash settlement in history Thursday, securing a $5.15 billion deal with Anadarko Petroleum to clean up dozens of sites across the country and compensate more than 7,000 people living with the effects of the contamination.

The agreement resolves claims stemming from the toxic legacy of one of the oil firm’s subsidiaries, Kerr-McGee, which operated a range of U.S. chemical, energy and manufacturing businesses over 85 years.

At a news conference, Preet Bharara, U.S. attorney of the Southern District of New York, said Kerr-McGee, which Anadarko acquired in 2006, left a trail of pollution in its wake and tried to evade responsibility by forcing U.S. taxpayers to pay for its actions.

The deal grew out of a lawsuit in U.S. Bankruptcy Court concerning Tronox, a paint materials manufacturer and unit of Kerr-McGee that was spun off in 2005 and later went bankrupt. The Anadarko Litigation Trust alleged that Kerr-McGee deliberately transferred its environmental and tort liabilities from its legacy businesses to Tronox before severing ties.

“Kerr-McGee’s businesses all over this country left significant, lasting environmental damage in their wake,” said Deputy Attorney General James M. Cole. “It tried to shed its responsibility for this environmental damage and stick the United States taxpayers with the huge cleanup bill.”

Despite those harsh words, investors — who had been worried about Anadarko’s financial outlook since December, when U.S. Bankruptcy Judge Allan Gropper said Kerr-McGee acted “with intent to hinder” by severing ties with Tronox — appeared relieved at news of a deal: The company’s stock rose Thursday, closing at $99.02 a share, up 14.5 percent.

“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,” Al Walker, Anadarko’s chairman and chief executive, said 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.”

The firm also estimated that it would receive a net $550 million tax benefit from the deal.

The stretch of Kerr-McGee’s operations over nearly a century was vast, Justice Department officials said, encompassing everything from wood treatment to rocket fuel processing. Its perchlorate business contaminated Lake Mead, a major source of drinking water for the Southwest; its uranium mining operations left radioactive waste piles throughout Navajo Nation territory.

The litigation trust that reached the agreement with Anadarko represented the federal government, 11 states, the Navajo Nation, a trust for individual plaintiffs and some environmental response trusts.

“If you are responsible for 85 years of poisoning the Earth, then you are responsible for cleaning it up. That is why this case was brought. That is why we are here today,” Bharara said, adding that the company “polluted indiscriminately and left others holding the toxic tab.”

The settlement will provide nearly $1 billion to clean up drinking water and address health risks for the Navajo Nation; Bharara noted that members of the community were so worried local children might swim in the contaminated water that “the Navajo Nation felt compelled to distribute a comic book warning children to avoid the radioactive uranium.”

“That’s what it came to,” Bharara said. “Kerr-McGee avoided its responsibilities, and children had to be warned away from swimming in contaminated water.”

Other money will be spent on cleanup sites in small towns and major urban centers, from a series of bluffs in Riley Pass, S.D., to the streets of Chicago. It will reimburse the Environmental Protection Agency for $217 million the agency has spent addressing lingering pollution from a wood treatment facility that used coal tar creosote and operated from 1910 until the mid-1950s in Manville, N.J, and give the state of New Jersey $4.5 million to compensate for the fact that the area’s groundwater resource can not be brought up to meet federal standards.

Fadel Gheit, a senior oil analyst at Oppenheimer, said the agreement was far lower than some of the projections analysts had been making; the plaintiffs had been seeking as much as $20.8 billion, while experts projected it would range between $5.2 billion to $14.2 billion.

“They settled on the low end of the range, so that’s why the market was happy with it,” he said, adding that it was “the lesser of two evils.”

Still, Gheit added, the size of the accord will put companies on notice that they can’t evade legal liability for environmental damages by severing their relationship with subsidiaries. “It tells you that you can run, but you cannot hide.”

Environmental Integrity Project director Eric Schaeffer, who led the 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.