The government will pay £33m to Eurotunnel in an agreement to settle a lawsuit over extra ferry services in the event of a no-deal Brexit.
In December, the Department for Transport (DfT) contracted three suppliers to provide additional freight capacity on ferries for lorries.
But Eurotunnel said the contracts were handed out in a “secretive” way.
As part of the agreement, Eurotunnel has agreed to make some improvements to its terminal.
One of the firms awarded a ferry contract, Seaborne Freight, has already had its deal cancelled after the Irish company backing it pulled out.
Shortly after it was awarded the contract, the BBC found out that Seaborne had no ships and had never run a ferry service.
Transport Secretary Chris Grayling has been heavily criticised for the Seaborne deal, which would have been worth £13.8m.
In January, Eurotunnel wrote to Mr Grayling to complain that it had not been considered when the contracts were awarded.
It argued that unlike Seaborne, it has actually run a cross-Channel ferry service (MyFerryLink, which closed in 2015) and should have been approached.
How has the government justified the payment?
In a statement accompanying the agreement, Mr Grayling said: “While it is disappointing that Eurotunnel chose to take legal action on contracts in place to ensure the smooth supply of vital medicines, I am pleased that this agreement will ensure the Channel Tunnel is ready for a post-Brexit world.”
Under the agreement Eurotunnel will make improvements at its terminal in Folkestone, including installing new scanners and changing traffic routing to ease congestion.
Andy McDonald MP, Labour’s shadow transport secretary said that Mr Grayling had shown “misjudgement” in awarding the ferry contracts.
Criticising his record, including problems on the railways, he said: “This trail of destruction has gone on long enough. It’s time for Chris Grayling to go.”
The Prime Minister’s spokesman said Theresa May had full confidence in Mr Grayling.
The BBC’s politcal correspondent, Alex Forsyth, says the prime minister can “ill afford further disruption in government, or to lose a loyal minister”.
A Eurotunnel spokesman said that the deal would ensure that the Channel Tunnel would be the “preferred route” for goods to travel between the EU and the UK.
The company said that the money would allow the “development of infrastructure, security and border measures that will guarantee the flow of vehicles carrying urgent and vital goods and that will keep supply chains essential to both industry and consumers moving”.
By Joe Miller, BBC Business reporter
It was the now notorious contract with Seaborne Freight that catapulted the government’s no-deal Brexit contracts into the headlines, but it’s the handling of the entire procurement process that has cost taxpayers some £33m.
Eurotunnel argues it would have been a strong contender for a contract, having run a ferry service as recently as 2015.
But the Department for Transport said the “urgency” of the situation forced it to hurry through the awarding of contingency planning contracts.
However, had it gone to court, Eurotunnel was going to argue that the DfT had ample time for a full, public tender process, and could have foreseen all Brexit eventualities from at least the date on which Article 50 was triggered in 2017.
Sources familiar with the case say the government was essentially “held over a barrel” by Eurotunnel, and was left with little choice but to settle.
Eurotunnel said in a statement: “[The settlement] will ensure that the Channel Tunnel remains the preferred route for vital goods to travel between the EU and the UK.
“The agreement enables the development of infrastructure, security and border measures that will guarantee the flow of vehicles carrying urgent and vital goods and that will keep supply chains essential to both industry and consumers moving.”
Why did the government award the contracts?
The idea behind the extra ferry services was to raise freight capacity at ports other than Dover, in the event of a no-deal Brexit.
Brittany Ferries, DFDS and Seaborne Freight were awarded contracts, worth more than £100m, to provide additional capacity for lorries.
There was particular concern over maintaining the supply of medicines to the NHS.
Speaking on Friday, Health Secretary Matt Hancock said: “While we never give guarantees, I’m confident that, if everyone – including suppliers, freight companies, international partners, and the health and care system – does what they need to do, the supply of medicines and medical products should be uninterrupted if we leave without a deal.”