A US federal judge has given final approval to an estimated $20bn settlement by global oil major BP for oil spill that occurred in the Gulf of Mexico in 2010.

The settlement was announced by BP in July last year, agreeing to pay all federal and state claims arising from the event.

The payments include a civil penalty of $5.5bn under the Clean Water Act (CWA) and $7.1bn to the US and the five Gulf states over 15 years for natural resource damages.

BP also agreed to pay $4.9bn to settle economic and other claims made by the five Gulf Coast states. The amount will be paid over 18 years.

US Attorney General Loretta E. Lynch said: "The approval of this agreement will open a final, hopeful chapter in the six-year story of the Deepwater Horizon tragedy.

"Today’s action holds BP accountable with the largest environmental penalty of all time while launching one of the most extensive environmental restoration efforts ever undertaken.

"The Department of Justice will continue to stand with the people of the Gulf as they seek to rebuild and protect the marine life, coastal systems, and beautiful beaches that have made the region a treasured natural resource."

Last year, BP also said that it would pay $1bn to resolve claims made by more than 400 local government entities, as part of the settlement.

BP estimated its pre-tax charges to increase to $53.8bn as a result of the settlement for the Deepwater Horizon accident and spill.

BP’s chairman Carl-Henric Svanberg had said: "In deciding to follow this path, 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."

A rig explosion on 20 April 2010 in the BP offshore facility in the Gulf of Mexico resulted in the death of its 11 workers and spilled millions of barrels of oil for nearly three months.