Before the election, protests intensified following the forced eviction of an 87-year-old woman from her home in Madrid, and on 29 September the minority government led by Pedro Sánchez adopted two emergency decrees to protect the social function of housing and stabilize rental contracts. Parliament rejected both of them (the first by 172 votes in favor and 178 against, the second by 166 in favor and 184 against), with the rejecting majority formed by PP, Vox, Junts, and UPN.
A few days after this legislative defeat, on 5 October Sánchez announced the calling of snap elections, although the election had initially been scheduled for 2027. New votes followed on 6 October, and later, after a general housing strike, on 12 November the main decree was validated, while the measure that automatically extended rental contracts was decisively rejected by the alliance between the right-wing parties, with PNV supporting only the first text.