(City and regional governments sold thousands of rent-controlled flats - subsidized to make them affordable to lower- income families - to private investors during Spain's economic crisis. Thousands of Spain's poor had been forced to rely on the acquiescence of multinational private investors to stay in their homes.)
The newly-elected left-wing mayor of Madrid on Tuesday overturned eviction orders for 70 families living in social housing and safeguarded more than 2,000 similar rental contracts.
The move is the latest by the administration of Manuela Carmena, backed by anti-austerity party Podemos, to protect housing in a country where a property boom-and-bust has resulted in tens of thousands of families losing their homes.
"There were 70 processes under way, but today those families have recovered their homes. Nobody is going to be thrown out on the street," Carmena said after meeting activists.
Carmena took office in June after her Ahora Madrid ('Madrid Now') alliance of community activists formed a coalition with the opposition Socialists to end 24 years of centre-right People's Party (PP) rule in the capital.
While Ahora Madrid is independent, it has the support of Podemos, along with many other city administrations formed by activists who took power in cities from Barcelona to Zaragoza after May's municipal elections.
The contracts related to a 2012 deal by the Madrid social housing body EMVS to sell five blocks of public housing to Spanish real estate developer Renta Corporacion for around 21 million euros ($23 million).
The deal fell through, but tenants said they were asked by the EMVS to sign new contracts putting a sell-by date on their subsidised terms in the event of a sale, in order to make the flats more attractive to sell to investment funds.
"The EMVS will no longer pressure the 220 families that live in five blocks owned by them in the centre to leave and it will stop the eviction processes for the 70 homes," the city council said in a statement, adding it would safeguard a further 2,086 similar social rental contracts around the city.
Alberto Romeral, a pensioner who lived in one of the flats under threat and leader of the activist group Yonomevoy ('I'm not leaving'), said of the mayor: "We are grateful that she looks out for the people of the city and their problems and does not want to crush them."
Romeral's subsidised rent is 232 euros per month.
Carmena has met the heads of Spain's biggest banks to discuss the problem of evictions, including Santander's Ana Botin, BBVA's Francisco Gonzalez and Bankia's Jose Ignacio Goirigolzarri.
The new administration has also set up a mediation service for people who cannot pay their mortgage and banks. Over 50,000 mortgage holders were evicted in 2013 and 2014 in Spain.
Austerity-weary Spaniards deserted the ruling PP in droves in May but opinion polls show Podemos, often aligned with Greece's Syriza, has lost support amongst voters since the Greek referendum and is trailing the two main parties ahead of November's parliamentary election.
[Reporting By Sonya Dowsett; Editing by Janet Lawrence.]