An adult education college at the heart of the Grenfell Tower community has been saved by a £32m government bailout following a campaign against plans which could have turned it into luxury housing.

The Royal Borough of Kensington and Chelsea bought Wornington college for a net sum of £25m in 2016 – almost a year before the Grenfell fire – and had plans to sell it on to a private housing developer for a potential £14m profit. Now RBKC faces a £15m loss after agreeing to sell it to the government for £10m.

Grenfell residents – including Ed Daffarn, who predicted the fire and campaigned against the council’s treatment of its tenants – attended the college, which was also used by many women returning to work after bringing up children and attended by recent immigrants to learn English.

Daffarn was part of the Save Wornington campaign and welcomed the government bailout, which he said “puts paid to RBKC’s plans to sweat yet more community assets”.

The deal marks a major victory for the Grenfell community which, more than two years after the disaster that claimed 72 lives, has suffered a series of setbacks, including delays to the public inquiry and police investigation, and a painful rehousing process, in which some families are wrestling with serious problems with their new homes.

“The Royal Borough of Kensington and Chelsea’s culture of disrespect that lay behind the ill treatment of Grenfell residents can also be evidenced by their purchase of the Wornington college freehold in 2016,” Daffarn said.

“The announcement of the government’s intention to safeguard the future of the college is to be welcomed. Many generations of North Kensington residents have had their lives transformed through studying at Wornington and it is a fitting legacy of Grenfell that this is now set to continue.”

An independent report into the sale of the Wornington campus by its owner Kensington and Chelsea college (KCC) to RBKC found that a senior RBKC official was brought on to the board of the KCC, giving “the opportunity for his role to be perceived as not independent”. It found both sides had the same property advisers, Lambert Smith Hampton, that there was a lack of consultation with the local community and “shortcomings in determining the final sale price”.

James Brokenshire, the housing secretary, said: “It is essential that two years after the Grenfell Tower tragedy, the people of North Kensington continue to get the support they deserve to help them rebuild their lives. This includes access to good quality further education and training at the heart of the community.”

Cllr Kim Taylor-Smith, the deputy leader of Kensington and Chelsea council, said: “We are listening to the views of the community and we hope to continue demonstrating that this council has changed. We have been working closely with Kensington and Chelsea college, the Department for Education, the Save Wornington campaign and all groups to identify the best way to secure a thriving future for the college on the site. The college is so important to our community and this is welcome investment. We are committed to continuing to work with everyone to make this happen.”