Carnival Corp has been ordered to pay a $20m fine for violating a five-year probation tied to environmental wrongdoing over several years.

The world's largest cruise company reached the tentative agreement today with federal prosecutors as punishment for polluting the ocean for years after vowing to stop, Associated Press reports.

Carnival has served two years of the five-year probation as part of a $40m settlement for illegally dumping oil into the ocean from its Princess Cruises ships for eight years and lying about it to US authorities.