The US government and states have reached a US$18.7bn (€16.8bn) settlement with BP over the 2010 Deepwater Horizon oil disaster.
The deal was announced as a federal judge was preparing to rule on how much BP owed in federal Clean Water Act penalties after the explosion and fire, which left 11 workers dead and an estimated 473 million litres of oil in the Gulf of Mexico.
The states involved in the settlement were Texas, Florida, Alabama, Mississippi and Louisiana.
Under the deal, BP Exploration and Production has been granted up to 18 years to pay the money, with the company handing over $5.5bn (€4.9bn) in civil penalties to the Federal government.
There will be US$7.1bn (€6.3bn) shared between the United States and the five Gulf states for natural resource damages.
BP said the figure was in addition to US$1bn already committed.
Also included in the settlement was US$4.9bn (€4.4bn) to settle economic and other claims made by the five states.
BP said the deal would increase its pre-tax charge associated with the disaster by $10bn (€9.01bn) to a total of $53.8bn (€48.4bn).
'Poor safety procedures'
The disaster struck on 20 April 2010 when a deep sea well, known as Macondo, suffered a blowout which resulted in flames engulfing the Deepwater Horizon platform on 20 April 2010.
Investigations later identified poor safety procedures.
The accident also destroyed the market value of BP - ground it is yet to recover.
While its share price rose more than 5% when news of the settlement was released, its market capitalisation remains some €56.3bn short of its pre-Gulf crisis level.
The fallout from the spill claimed the job of-then chief executive Tony Hayward, who contributed to the PR disaster facing the company at the time with a number of gaffes as the company scrambled to cap the Macondo well.
Bob Dudley, who succeeded him, said today: "This is a realistic outcome which provides clarity and certainty for all parties."
"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."
"For the United States and the Gulf in particular, this agreement will deliver a significant income stream over many years for further restoration of natural resources and for losses related to the spill."
"When concluded, this will resolve not only the Clean Water Act proceedings but also the Natural Resource Damage claims as well as other claims brought by Gulf States and local government entities."