Updated

Remember the Deepwater Horizon incident that happened a few years ago? The one that killed 11 workers, spewed millions of barrels of oil into the Gulf of Mexico, and is widely regarded as the worst oil spill in US history? Well good news: BP has finally reached a settlement, and has agreed to pay 18.7 billion dollars in damages to the US government.

"If approved by the court, this settlement would be the largest settlement with a single entity in American history," Attorney General Loretta E. Lynch said in a statement. "It 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."

Of the $18.7 billion figure, roughly $12.8 will go toward paying Clean Water Act fines and natural resources damages, with another $4.9 to be payed out to states affected by the spill. The governments of Louisiana, Mississippi, Florida, Texas, and Alabama -- as well as 400 different local government entities included in the settlement -- will each receive a portion of that sum to compensate for the damages caused by the spill.

This agreement comes on top of the 43.8 billion that BP has already set aside for cleanup costs and criminal/civil penalties, according to Reuters. But the company will have plenty of time to cough it up. The preliminary settlement (which still needs to be approved by the courts) specifies that BP will be allowed to space out payments over as many as 18 years.

"This agreement will resolve the largest liabilities remaining from the tragic accident," BP CEO Bob Dudley said in a statement. "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."