US Courts have ordered BP to pay more than $US20 billion ($AU28 billion) in fines from the deadly Gulf of Mexico oil spill five years ago.

In what could mark the largest corporate settlement of its kind in US history, BP is paying to resolve nearly all claims from the big spill.

The agreement adds to the $US43.8 billion BP has already set aside for criminal and civil penalties and cleanup costs.

The company claims its total pre-tax charge for the spill has now hit $US53.8 billion.

The penalty announced by US Attorney General Loretta Lynch this week is higher than the $US18.7 billion deal outlined in July, partly because it now includes $US1 billion in extra restoration work.

BP's shares rose nearly 3 per cent in the US on the new, with investors praising the agreement as a cap on future liabilities.

The fines will be paid to the federal government, five Gulf Coast states and hundreds of municipalities over the course of 18 years to fund environmental restoration and economic development programs.

“This agreement will launch one of the largest environmental restoration efforts the world has ever seen,” Ms Lynch said.

The pact will “not only compensate for the damages and provide for a way forward for the health and safety of the Gulf, but let other companies know they are going to be responsible for the harm that occurs should accidents like this happen in the future,” Ms Lynch told reporters at a briefing in Washington.

The spill affected 2,000 kilometres of coastline, dumping over three million barrels of crude into the sea.

It destroyed the local fishing industry and even injured fishermen, prompting overhauls of safety rules and emergency plans around the massive offshore oil basins.

The big payout is split between a number of issues; $US7.1 billion for natural resource damages, $US5.5 billion for Clean Water Act fines, and $US4.9 billion in payments to states.

Federal and state officials formally filed the settlement, and it is expected to be approved by a US District Court in Louisiana in coming weeks.

“The filing of the consent decree does not reflect a new settlement or any new money,” BP spokesman Geoff Morrell said.

It means BP has effectively settled all the major claims from the spill, after previous settlements saw $US7.8 billion in compensation paid to individuals claiming economic harm from the spill.

Contractors Transocean and Halliburton have been awarded settlements too.

“This pretty much puts a final stamp on the settlement and the pain of the past five years can come to an end,” said Iain Armstrong, an oil sector analyst at the London-based firm Brewin Dolphin Ltd.