Oil driller Anadarko has been ordered to pay billions of dollars in clean-up costs after a judge ruled that the firm's Kerr-McGee unit tried to shed these liabilities in a spin-off deal.

A federal bankruptcy court in New York ruled that Anadarko owes damages between $5.15 billion and $14.12 billion, with the precise amount to be determined in future legal proceedings. The Justice Department said Friday that the judgment was "one of the largest environmental enforcement awards ever."

The formerly independent Kerr-McGee operated a variety of chemical and resource extraction businesses that left contamination across the country over more than eight decades, including radioactive uranium waste in the Navajo Nation and radioactive thorium in Illinois.

In 2005 and 2006, the company transferred its valuable oil and gas exploration assets to a new corporate entity that was later acquired by Anadarko. The environmental liabilities were left with the old company, which was renamed Tronox (TROX).

Related: Iran oil exports rise in November

Weighed down by these debts, Tronox filed for bankruptcy protection in 2009. The U.S. government and the Tronox bankruptcy estate later sued Anadarko, charging that Kerr-McGee split its business with the intention of ducking its clean-up costs.

"The United States will not let polluters evade their environmental liabilities through a corporate shell game," Manhattan U.S. Attorney Preet Bharara said in a statement.

Anadarko (APC) shares slipped 6.4% on the news Friday, while Tronox (TROX) shares surged 7.5%.

Anadarko CEO Al Walker said his company planned to appeal the ruling.

"Given the significant factual evidence supporting our position, we vehemently disagree" with the judge's opinion, Walker said in a statement.

Anadarko was also on the hook for huge clean-up costs following the 2010 oil spill disaster in the Gulf of Mexico. Anadarko owned a 25% stake in the ill-fated well, and agreed to pay well operator and majority shareholder BP (BP) $4 billion in 2011 to cover its share.