(Bloomberg) -- The UK government will be repaid £3 billion ($3.8 billion) by Octopus Energy Ltd. after stepping in to help the company in its takeover of Bulb Energy Ltd, which failed during the energy crisis.

The UK government will recoup almost all the costs from temporarily taking Bulb into public ownership in 2021, according to a statement by Octopus, which was originally reported by the Financial Times. The government paid about £1.6 billion to help Octopus buy energy in advance to supply the customers of the collapsed firm, taking its profit close to £1.3 billion.

“This outcome is a great result for taxpayers. Octopus worked hard in the darkest depths of the energy crisis to create a fair deal, meaning that although Bulb went bust with billions of liabilities, it has cost the government almost nothing,” Octopus Chief Executive Officer Greg Jackson said.

The ability for the market and state to successfully implement a special administration regime — a form of temporary nationalization — on a distressed but strategically important company will be likely considered a win for the government. Thames Water Ltd. is another major strategic asset which the government has been preparing for the same measures, as it struggles with piling debt and huge investment needs.

Octopus gained 1.5 million accounts from Bulb, which has helped secure its place as the top electricity supplier in the country, beating Centrica Plc.

(An earlier version of this story corrected the amount the government paid in the second paragraph.)

(Adds government profit in second paragraph.)

©2024 Bloomberg L.P.