Spanish Socialist Workers' Party of the Community of Madrid

The Spanish Socialist Workers' Party of the Community of Madrid (Partido Socialista Obrero Español de la Comunidad de Madrid, PSOE–M), from 2004 to 2015 the Socialist Party of Madrid (Partido Socialista de Madrid, PSM–PSOE) and previously the Madrilenian Socialist Federation (Federación Socialista Madrileña), is the branch of the Spanish Socialist Workers' Party (PSOE) in the Madrid region.

Leadership since 1977
The list of leaders of the PSOE regional party branches in Madrid since 1977 is as follows:
 * Alonso Puerta (1977–1979)
 * Joaquín Leguina (1979–1991)
 * Teófilo Serrano (1991–1994)
 * Jaime Lissavetzky (1994–2000)
 * Rafael Simancas (2000-2007)
 * Caretaker commission presided by Cristina Narbona (June–July 2007)
 * Tomás Gómez (2007–2015)
 * Caretaker commission presided by Rafael Simancas (February–July 2015)
 * Sara Hernández (2015–2017)
 * José Manuel Franco (2017–2021)
 * Juan Lobato (2021–present)

2021 primary election
Following the party's bad results at the 2021 regional election, José Manuel Franco handed in his resignation as Secretary-General in May 2021. The PSOE's federal executive committee ensuingly appointed a PSOE–M managing committee led by Isaura Leal. Three pre-candidates tried to collect enough endorsements to run in the primary election to the post of Secretary–General: Eva Llarandi (PSOE's Secretary General in Paracuellos), Javier Ayala (Mayor of Fuenlabrada), and Juan Lobato (former Mayor of Soto del Real).