Millions of workers across Spain walked out on Wednesday in the country's first general strike in 14 years, demanding government action on a housing crisis less than three weeks before a national election that could bring the far right to power.

The 24-hour stoppage, called by Spain's two biggest unions, the CCOO and the UGT, under the slogan "Salaries. Housing. Prices.", was expected to delay the widely used public transport system and slow or shutter businesses, factories and shops across the eurozone's fourth-largest economy.

The average rent in Spain has almost doubled in the last 10 years, eating into household budgets and angering voters. Public anger reached a boiling point after the nationally televised eviction last month of 87-year-old Maricarmen Abascal from the Madrid flat where she had lived for decades; her subsequent death made her a symbol for Spaniards who feel they pay too much in rent and cannot dream of home ownership. Housing activists leveraged the uproar to call for the strike, and soon won the backing of the two main unions.

The activists want several measures, including the elimination of tourist apartments, a crackdown on real-estate speculation and protection for renters in the form of automatic lease renewals. The unions are also demanding more government intervention in the housing market and a new minimum-wage agreement through talks with the business owners' association. The Bank of Spain says the country has a shortage of 750,000 homes, a figure that could exceed one million by 2028, while average rents have reached 1,176 euros a month against an average young person's salary of 1,190 euros.

The protests over Maricarmen's eviction propelled Spain's government to push through emergency measures to limit evictions and help tenants, but right-wing parties in Parliament refused to ratify them, arguing they would drive properties out of the rental market. Prime Minister Pedro Sanchez responded by calling a snap election on October 5 for November 29, hoping to earn four more years in power for his left-wing coalition. On Thursday, the government will again try to have a reduced interim Parliament ratify the two housing decrees the full lower chamber rejected last month.

Sanchez posted a long video on social media this week lauding the workers' movement and warning that right-wing parties would bring austerity and underfunded public services. Veronica Martinez, spokesperson for Sumar, the junior member of the government, said the left needs the country's workers to mobilize: "Rights are first won on the streets and then later in the institution."

The traditional conservative Popular Party and the far-right Vox oppose government intervention in the housing market beyond incentivizing the construction of new homes, and both argue the unions are playing politics to help Sanchez stay in office, with months of polling showing voters leaning toward the right. "This strike is not a general strike; it is an electoral strike," Popular Party spokesperson Miguel Tellado said on Tuesday. Political scientist Oriol Bartomeus of the Autonomous University of Barcelona told the Associated Press that the Socialists need the strike to succeed without violence so the election campaign swings back to housing, but the right could benefit if it descends into street violence.

The walkout also comes as Spain reels from a high-speed train collision that killed 69 people, the country's second deadly rail disaster of the year, which has dominated Spanish news and created a drag on Sanchez's campaign.