British Gas has won its appeal against regulator Ofgem over claims the way the energy price cap had been calculated was unfair, a court has ruled.

The legal challenge, which was supported by Npower, SSE, EDF, Eon and Scottish Power, could now result in officials reassessing how the cap is totted up at the next recalculation in February.

Centrica, British Gas’s parent company, have previously claimed the rules had cost the business £70 million in the first three months of 2019 following the cap’s implementation.

The ruling by Mrs Justice Andrews at the High Court agreed with bosses and said “British Gas succeeds in its claim and is entitled to the declaratory relief that it has sought.”

British Gas and its rivals were angry that Ofgem initially calculated the price cap based on the wholesale price of gas and electricity from one period – allowing companies to fix, or “hedge”, the price they paid – only for officials to change their minds at the last minute.

Because suppliers had already “hedged” against price movements in the wrong period, it meant they all suffered heavy losses when the cap was finally introduced in January.

Following the decision, Centrica said: “This outcome underlines the importance of transparent and rigorous regulatory processes to ensure well-designed regulation that is in the interest of a well- functioning energy market, which in turn allows participants to operate with confidence and ultimately benefits all energy consumers.

“We look forward to continuing to work closely with the government and the regulator on the development of future policy and we remain committed to delivering for our customers’ changing needs, including through our involvement in the transition to a lower carbon future.”

An Ofgem spokesman said: “We are disappointed by the High Court’s judgment. Our overarching objective was to set the cap at a level that protected consumers.

“The judgement doesn’t change the fundamentals of the price cap, which remains in place and will continue to protect 11 million households on default deals, ensuring that they pay a fair price for their energy.

“We our considering our next steps in light of the judgment.”

The price cap was a flagship policy under former prime minister Theresa May, who vowed to save the average home £80 a year by capping pricey standard variable tariffs.

The first cap came in at £1,137 a year for average consumption in a typical home, but it quickly rose to £1,254 in April. It now sits at £1,179 and is assessed every six months by Ofgem.

Mrs Justice Andrews added that the cap was hastily introduced – something critics of the policy have previously complained about.

She said: “There is no doubt that in fixing a single price cap for all suppliers, with a view to protecting current and future customers on default tariffs, (Ofgem) had a complex and difficult task to perform. It was also put under significant time constraints.”