NEW ORLEANS (AP) – A federal judge has approved Transocean Ltd.’s agreement with the Justice Department to plead guilty to a misdemeanor charge and pay $400 million in criminal penalties for its role in the 2010 Gulf of Mexico oil spill.

U.S. District Judge Jane Triche Milazzo accepted Transocean’s plea and imposed the agreed-upon sentence during a hearing Thursday. The Swiss-based drilling company could have withdrawn from the deal if she had rejected it.