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.”
What’s the fallout for the Transport Secretary?
By Alex Forsyth, BBC political correspondent
The procurement of extra ferry services has proved highly problematic. First the fact a contract given to a firm with no ships was later cancelled, and now the decision to settle with Eurotunnel rather than face a lengthy legal fight.
Critics say it shows that, despite the government’s insistence that it is preparing for a possible no-deal Brexit, plans have fallen short.
Others point the finger at the transport secretary himself.
Labour has repeatedly called for Chris Grayling to resign, citing what the party describes as a series of failures including the introduction of a new rail timetable that led to delays and cancellations and criticism of probation reforms introduced while he was justice secretary.
But while there is a chorus of criticism aimed at Mr Grayling, No 10 maintains the prime minister has confidence in him. Theresa May can ill afford further disruption in government, or to lose a loyal minister.
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.”
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 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”.
Why did the Department for Transport settle?
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.
And Andrew Dean, from law firm Clifford Chance, warns this may not be the end of the matter.
Mr Dean, who used to advise DfT and is a procurement specialist, says: “If Eurotunnel were required to develop or redevelop infrastructure that delivers or supports a public function as part of this settlement, there is a risk it could be construed as another piece of public procurement without open and transparent competition.
“In which case the government would be back to square one, with other potential providers able to challenge the process.”