The government will spend almost £6bn buying back thousands of military homes into public ownership.
The Ministry of Defence (MoD) will buy back 36,347 homes from property firm Annington in a reversal of the 1996 privatisation process.
The deal will end the £230m annual rental cost of the homes, ministers and officials said.
Defence Secretary John Healey described the “dreadful deal” to privatise the service family estate as a “fire sale” by the Conservatives in the run-up to the 1997 general election.
“Today ends one of the worst-ever government deals,” he said.
Mr Healey warned problems with military accommodation “will not be fixed overnight” but called the move a “decisive break with the failed approach of the past and a major step forward on that journey”.
He said: “This is a once in a generation opportunity, not only to fix the dire state of military housing but to help drive forward our economic growth mission, creating jobs and boosting British housebuilding.
“Our armed forces and their families make extraordinary sacrifices: theirs is the ultimate public service.
“It is shameful that in the lead up to Christmas, too many military families will be living with damp, mould and sub-standard homes – issues which have built up over the past decade.
“We are determined to turn this around and renew the nation’s contract with those who serve.
“These important savings to the defence budget will help fix the deep-set problems we inherited.”
Read more from Sky News:
Sara Sharif’s father and stepmother jailed for her murder
Inside the drug factories that bankrolled Assad’s narco state
Illegal casinos using video game to draw children into gambling
Deal prevents demolition of old properties
The service family estate was sold in 1996 and is now valued at £10.1bn when not subject to leases. It is being purchased for £5,994,500,000.
The previous Conservative government began the process of bringing the homes back under public ownership, with the MoD winning a legal battle in 2023 to take some of the properties back.
The Addington arrangement meant homes were rented at a discount from the market rate but the taxpayer was responsible for maintenance costs, with improvements potentially pushing up rents.
Although most of the properties date from the 1950s and 1960s, the deal with Annington has prevented the MoD from being able to demolish them to build new accommodation.
Net financial debt will be limited to £1.7bn
The previous deal left the taxpayer nearly £8bn worse off, the MoD said, with £4.3bn in rental payments and vacant properties worth around £5.2bn handed back to Annington – though this was partially offset by the £1.7bn income generated in 1996 as part of the original deal.
However, because the deal eliminates the liabilities associated with the leases, the impact on net financial debt will be limited to £1.7bn, despite the near £6bn outlay.
Treasury Chief Secretary Darren Jones said: “This is a landmark deal that will start saving the taxpayer money immediately, all while driving forward our mission to create growth across the country.
“Not only does it open the door to major development and improvements across the military housing estate, but most important of all, it will help us on our mission to build more houses and deliver our service personnel the homes they deserve.”