British oil company BP is finally settling up with the federal government and five states affected by the devastating oil spill that hit the Gulf Coast when BP’s Deepwater Horizon rig exploded in 2010. The company has tentatively agreed to pay $18.7 billion in damages over 18 years, The New York Times reports.

As of 2014, BP had already paid $27 billion as a direct result of the spill, including $14 billion for emergency cleanup and $13 billion to settle claims from individuals and businesses.

Earlier this week, the Supreme Court denied BP’s appeal of a ruling that found the company liable for violations of the Clean Water Act and said its failures at the Deepwater pump led to the largest offshore oil spill in American history.

[Photo: AP Images]