Britain has paid out £33m to settle a claim with Eurotunnel which runs the Channel Tunnel between Britain and France.
The payout comes after accusations of a "secretive" process to award ferry contracts to cope with a no-deal Brexit.
In a statement, the government said it had reached agreement with Eurotunnel to ensure the Channel Tunnel would continue to keep passengers and freight moving after Britain leaves the European Union on March 29.
Eurotunnel's holding company is Getlink.
"The agreement with Eurotunnel secures the government’s additional freight capacity, helping ensure that the NHS has essential medicines in the event of a no deal Brexit," British Transport Secretary Chris 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," he added.