González Rodríguez, PaulaPassarelli, FrancescaRebollo-Sanz, Yolanda F.2026-07-092026-07-092026-08European Journal of Political Economy Volume 94, August 2026, 10287110.1016/j.ejpoleco.2026.102871https://hdl.handle.net/10433/27204We acknowledge financial support from Agencia Estatal de Investigación (Ministerio de Ciencia, Innovación y Universidades), projects PID 2023-151366OB-I00 and PID28020-118585 GB-100, Fondo Europeo de Desarrollo Regional y Consejería de Transformación Económica, Industria, Conocimiento y Universidades. We are grateful to participants at several conferences and seminars for helpful comments and suggestions. The comments from co-editor Johanna Rickne and two anonymous referees have significantly improved the paper. We declare that we have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.Using data on nearly 190,000 candidates across five Spanish municipal elections (2003–2019), we estimate the causal effect of electoral defeat on party switching. We combine a high-dimensional fixed effects panel model with a regression discontinuity design exploiting the quasi-random assignment of council seats under Spain's closed-list D'Hondt system. Both approaches yield consistent evidence that not securing a council seat is associated with a higher probability of changing party affiliation by 2.1 to 2.3 percentage points—a 13.5% to 14.5% relative increase. Additionally, regression estimates show that party switching is more strongly linked to better future electoral outcomes among non-elected switchers than among candidates who switch while holding a seat. Our results support the theory that politicians are primarily motivated by office-seeking ambitions and highlight the strategic nature of party switching in local politics.application/pdfenAttribution-NonCommercial-NoDerivatives 4.0 Internationalhttp://creativecommons.org/licenses/by-nc-nd/4.0/Party switchingParty labelsPolitical defectorsClosed-list systemsPoliticiansOffice-seeking ambitionSpain Municipal electionsRegression discontinuityLosing Office, Switching Sides: Evidence from Spanish Municipal Electionsjournal articleembargoed access