NEW ORLEANS (AP) -- A federal judge has approved an agreement for BP (NYSE:BP) to plead guilty to manslaughter and other charges and pay a record $4 billion in criminal penalties for the company's role in the massive 2010 oil spill in the Gulf of Mexico.

BP agreed in November to plead guilty to charges involving the deaths of 11 workers aboard the drilling rig that exploded and for lying to Congress.

Before ruling on Tuesday, U.S. District Judge Sarah Vance heard testimony from relatives of workers who died when BP's blown-out Macondo well triggered an explosion on the Deepwater Horizon rig in April 2010.

More than 200 million gallons of oil spewed from the well about 50 miles southeast of the Louisiana coast before it was capped three months later.

The Motley Fool has no position in any of the stocks mentioned. Try any of our Foolish newsletter services free for 30 days. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.