A council has apologised after losing millions of pounds of public cash in the collapse of an energy company it started.
Robin Hood Energy (RHE) is shutting with the loss of 230 jobs despite millions poured into it by Nottingham City Council.
British Gas will take on its customer base of thousands of homes in England.
The council said the sale will not make up all its losses, which leaked documents suggest are £38.1 million.
Council leader David Mellen declined to say how much it stands to lose, saying the total from the sale will depend on how many customers switch to British Gas.
However, leaked documents seen by the Local Democracy Reporting Service suggest the taxpayers of Nottingham are out of pocket to the tune of £38.1 million.
The confidential documents show the sale price for the customer base of RHE is estimated by the council to be around £26 million.
The final exact figure will not be known until the transfer of customers to British Gas is complete, but the £38.1 million write-off is the council's estimate.
Mr Mellen said: "There will be significant amounts of money we won't be able to recoup.
"Today my thoughts are particularly with those people facing a redundancy process.
"I'm very sorry that is the case, I don't hesitate to say sorry when we've got things wrong, my priority now is to get things right."
The company was set up in 2015 with the intention of tackling fuel poverty and claimed to be the first council-run energy company in the UK.
But a recent report by auditors Grant Thornton found the company had struggled in the energy market, making losses every year it existed and becoming reliant on council cash.
Their report showed the council had invested £43m into it and provided £16.5m of guarantees and accused the authority of "institutional blindness" for continuing to prop it up.
Councillor Mellen said they "had to" stop supporting it "off the back of the people of Nottingham".
By Hugh Casswell, BBC Radio Nottingham political reporter
This has been a disaster and an embarrassment for Nottingham City Council.
At a time when they routinely criticise central government for a loss of funding, they've been publicly shamed for losing millions in taxpayer cash. What's more, they've had to accept it. No spin. No deflection. A straight and unavoidable mea culpa.
One key question remains though - exactly how much has been lost? We may not know that for some time.
And what do all those lost millions mean? Put simply, it's added to the council's need to make savings - a particularly bitter pill to swallow for council employees who may be facing redundancy and for Nottingham residents who may lose out from service cuts.
Local government minister Simon Clarke said: "The people of Nottingham will be aghast at this disastrous waste of their hard-earned money.
"This will likely have stark consequences in the real world in terms of service cuts and job losses at Nottingham City Council.
"It is now for the council's leadership to decide whether they are the right people to continue to lead one of our most important cities."
Robin Hood Energy supplied 10 council-run energy providers. According to the company, these are:
- Angelic Energy (Islington Council)
- Beam Energy (Barking and Dagenham Council)
- CitizEN Energy (Southampton City Council and neighbouring councils)
- Fosse Energy (Leicestershire County Council and Leicester City Council)
- Great North Energy (Doncaster Council & Barnsley MBC)
- The Leccy (Liverpool City Council)
- RAM Energy (Derby City Council)
- Southend Energy (Southend-on-Sea Borough Council)
- White Rose Energy (Leeds City Council)
- Your Energy Sussex (West Sussex County Council and local authorities)
In total it supplied 112,000 people and 2,600 businesses.
Every customer will now be automatically switched to British Gas, unless they opt to go elsewhere.
British Gas announced they were buying the customer base, but not the rest of the company.
- Liverpool City Council
- Nottingham City Council
- Islington London Borough Council
- British Gas
- Derby City Council
- Southend-on-Sea Borough Council
- Leeds City Council
- West Sussex County Council
- Doncaster Metropolitan Borough Council
- Barking and Dagenham London Borough Council
- Leicester City Council
- Leicestershire County Council