UK transport secretary, Chris Grayling, said the cancelled contracts were part of a £4bn no-deal "insurance policy" the government had put in place.

The government bought £89m worth of capacity from the two firms and some of this capacity might be sold, but millions of pounds could be lost, BBC reported.

The contracts were designed to ease pressure on the port of Dover, by creating extra services at other ports.

According to a recent report by Drewry, short sea container services between the UK and EU could provide alternative capacity to alleviate possible congestion at the Port post-Brexit.

In February, the Department for Transport was forced to axe its £13.8m contract with a third company, Seaborne Freight.

Earlier this year, the National Audit Office estimated that the cancellation costs of all the ferry contracts would be £56.6m. The cost is likely to only be several million pounds less than this.

Meanwhile, the Department for Transport is facing legal action from P&O Ferries, which says its rival, Eurotunnel, was given a competitive advantage by the government.

If extra cross-Channel freight services are needed again in the run-up to the new Brexit deadline in October, the government could have to negotiate a new set of contracts, he said.