Millions of workers joined a 24-hour general strike across Spain on Wednesday, the country’s first in 14 years, in a protest over soaring rents and house prices that has become the defining issue of Spanish politics.

The strike was called by Spain’s two largest unions, the UGT and the CCOO, together with tenants’ associations, under the slogan “Salaries. Housing. Prices.” The unions said about four million workers took part, roughly a fifth of the workforce, while the tenants’ union expected up to five million.

The protest was driven by a housing crisis that has made renting unaffordable for many Spaniards. The average rent is now €1,176 a month, about 98.7 per cent of a young person’s average salary, and Spain has a housing deficit of around 750,000 homes, which the central bank expects to pass one million by 2028.

Public transport was disrupted across the country, about five per cent of flights were cancelled, and factories and shops scaled back operations. The strike was mostly peaceful, but there were evening clashes in Barcelona and Madrid, with at least 73 arrests and 1,044 strike-linked incidents recorded by 9 p.m. GMT.

The movement grew from the eviction in September of 87-year-old pensioner Maricarmen Abascal, who died days later. Her case became a symbol of the housing crisis, and the protests that followed it have grown into the largest social movement in Spain in years.

It is the first general strike in Spain whose main driver is housing rather than austerity. The last general strike, in 2012, was called against labour reforms and spending cuts during the eurozone debt crisis. This time, the anger is about the cost of a roof over people’s heads.

The strike comes less than three weeks before a snap general election on 29 November. Prime Minister Pedro Sánchez, whose government called the early vote, hopes to harness the anger over housing, and has promised new measures to bring down rents and build more affordable homes.

The government has already announced plans to cap rents in the most stressed areas and to speed up the construction of public housing, but campaigners say the measures do not go far enough, and that the market has been left to set prices for too long.

For the unions, the strike was a show of strength ahead of the election, and a warning to whichever party wins that housing will be the first test of the new government. “This is not a strike against a government,” one union leader said. “It is a strike for a right.”

Whether the strike changes the election is unclear, but it has already changed the conversation in Spain. Housing, once a background issue, is now the question every party must answer, and the four million people who stayed away from work on Wednesday made sure it stays at the top of the agenda.