BRITISH energy giant BP says it has agreed to pay a record $US18.7 billion ($24.47 billion) to compensate the US government and five states for damages stemming from the deadly 2010 Gulf of Mexico oil spill.

The spill was sparked by an explosion on the Deepwater Horizon rig, which killed 11 men. Millions of barrels of oil flowed into Gulf waters, in one of the worst environmental disasters to strike the United States.

It took 87 days to cap BP’s runaway well — some 1500 metres below sea level off the coast of Louisiana.

Beaches were blackened in five states and the region’s tourism and fishing industries were crippled in a tragedy that riveted the nation.

BP’s share price closed up four per cent at $8.94 following the announcement, which was welcomed by the US government. Attorney General Loretta Lynch said it would take several months to finalise the deal.

“The board has balanced the risks, timing and consequences associated with many years of litigation against its wish for the company to be able to set a clear course for the future,” said BP chairman Carl-Henric Svanberg.

“With this agreement, we provide a path to closure for BP and the Gulf.”

The deal has been struck with the US federal government, the Gulf Coast states of Alabama, Florida, Louisiana, Mississippi and Texas and more than 400 local governments whose economies were badly hit by the disaster.

The settlement increases the pre-tax cost to BP of the Deepwater Horizon explosion in April 2010 by an estimated $US10 billion to $US53.8 billion, the company said.

“This is a realistic outcome which provides clarity and certainty for all parties,” said BP group Chief Executive Bob Dudley.

“For BP, this agreement will resolve the largest liabilities remaining from the tragic accident and enable BP to focus on safely delivering the energy the world needs.”

Ms Lynch said the US Justice Department had been “fully committed to holding BP accountable, to achieving justice for the American people and to restoring the environment and the economy of the Gulf region.”

If approved by a court, the settlement “would help repair the damage done to the Gulf economy, fisheries, wetlands and wildlife, and it would bring lasting benefits to the Gulf region for generations to come,” she added.

“This settlement would be the largest settlement with a single entity in American history.”

The settlement, to be enacted by BP’s US upstream subsidiary, BP Exploration and Production Inc, includes $US5.5 billion to be paid to the US over 15 years as a civil penalty under the Clean Water Act.

A further $US7.1 billion will be paid to the US and Gulf Coast states over 15 years for natural resource damages, in addition to $US1 billion already committed.

BP will also set aside $US232 million to cover any further, unforeseen damages at the end of the payment period.

Another $US4.9 billion will be paid over 18 years to settle economic and other claims made by the five Gulf Coast states.

And up to $US1 billion will be paid to resolve claims made by more than 400 local government entities.