Princess Cruises has been fined $40m for the use of a “magic pipe” to illegally dump oil contaminated waste at sea by a court in Miami on Wednesday.

The US Department of Justice (DOJ) described the fine as “ the largest-ever for crimes involving deliberate vessel pollution”.

A British engineer is also set to be awarded $1m for reporting the illegal discharges to the UK’s Maritime and Coastguard Agency (MCA), which in turn provided the evidence to the US Coast Guard.

The newly hired engineer on the Caribbean Princess (built 2004) reported that a so-called “magic pipe” had been used on 23 August 2013, to illegally discharge oily waste off the coast of the UK without the use of required pollution prevention equipment.

Subsequent investigations found that other illegal practices which were found to have taken place on five Princess ships – the Caribbean Princess, Star Princess, Grand Princess, Coral Princess and the Golden Princess.

The evidence gathered by the whistleblower, including photographs of the magic pipe, led to an inspection of the cruise ship both in the UK and then when it reached New York on 14 September 2013.

During each of the separate inspections certain crew members are alleged to have concealed the illegal activity by lying to the authorities in accordance with orders they had received from Caribbean Princess engineering officers.

The sentence will see Princess remain on probation for a period of five years during which time all of the related Carnival cruise ship companies trading in the US will be required to implement an environmental compliance plan that includes independent audits by an outside company and oversight by a court appointed monitor.

As a result of the investigation, Princess is said to have already taken various corrective actions, including upgrading the oily water separators and oil content monitors on every ship in its fleet and instituting many new policies.

According to papers filed in court, the Caribbean Princess had been making illegal discharges through bypass equipment just after a year after she was delivered.

The August 2013 discharge about 23-miles off the coast of the UK involved about 4,227 gallons within the country’s Exclusive Economic Zone.

At the same time as the discharge, engineers ran clean seawater through the ship’s monitoring equipment in order to conceal the criminal conduct and create a false digital record for a legitimate discharge.

The US DOJ said one practice was to open a salt water valve when bilge waste was being processed by the oily water separator and oil content monitor.

The purpose was to prevent the oil content monitor from going into alarm mode and stopping the overboard discharge. This was done routinely on the Caribbean Princess in 2012 and 2013.

The second practice was said to involve discharges of oily bilge water originating from the overflow of graywater tanks into the machinery space bilges.

This waste was pumped back into the graywater system rather than being processed as oily bilge waste, and then pumped overboard anytime the ship was more than four nautical miles from land. As a result, discharges within US waters were likely.

None of the discharges were recorded in the oil record books that are required to be maintained on board the ships.