Scottish Power, British Gas and Eon claimed an “unfair sale process” led to decisions “to commit billions of pounds of taxpayer money to facilitate the acquisition of a failed business” by rival firm Octopus Energy.
The three businesses brought legal action against the Government, alleging its decision-making process was “flawed and unlawful”.
But in a ruling on Friday, Lord Justice Singh and Mr Justice Foxton rejected the legal challenge.
The judges concluded: “In circumstances in which the Octopus transaction was the only bid to emerge from a lengthy M&A process which the Secretary of State was entitled to conclude was open, transparent and competitive, that was an assessment lawfully open to the Secretary of State.”
They added: “It was open to the Secretary of State on the material before him to conclude that the other options were inferior to proceeding with the Octopus bid, involving significant execution risks and higher forecast costs.”
British Gas owner Centrica said the ruling was “disappointing” and that it would now “consider our options.
A spokesperson said: “We think state bailouts for energy companies puts a burden on the UK taxpayer and is avoidable.
“We felt the original bailout of Bulb was unnecessary and the National Audit Office report this week concluded there were risks and uncertainties in recovering these funds from Octopus.”
They added: “The decision to bring this case was made after failed attempts to obtain transparency on the terms of the transaction and the level of state bail out being offered to Octopus/Bulb.
“We believe that the way the deal was structured creates serious risk for taxpayers and energy consumers and will distort the energy market.”
It is understood that Scottish Power will not seek to appeal the ruling.
At a hearing in London last month, the judges were told that the handling of the sale allegedly prevented British Gas making a “better” offer that could have saved money for taxpayers.
British Gas’s legal team also claimed “the process by which the subsidy was granted was seriously lacking in transparency, openness, fairness and equal treatment”.
The energy companies challenged two decisions taken by the then Department for Business, Energy and Industrial Strategy (BEIS) in October and November: to approve the takeover and to provide “very substantial central Government funding” to help with the transfer.
The department’s lawyers said the claims against it were “without merit”, arguing that companies were aware they could seek Government support.
They said the department made “rational” decisions after expert advice that Octopus’s offer represented “the value that the market is placing on Bulb in the current sector environment”.
Unwinding the sale now would be “liable to cause chaos”, the Government’s lawyers warned.
Octopus argued its rivals’ complaints were a “rewriting of history” and that its purchase of Bulb would be “extremely beneficial” for the Government and taxpayers.
In October, Octopus announced a deal to buy its rival and take on Bulb’s approximately 1.6 million customers after the 650-employee firm was placed into special administration in November 2021.
It was later revealed in December that ministers were prepared to pay up to £4.5 billion to help fund the takeover of Bulb.