In the process of the democracy restoration in Spain between 1975–1978, the nationalist and regionalist parties pressed to grant home rule to parts of Spain. Finally, the Constitution stated that any province or group of provinces could form an autonomous community and thus be granted partial home rule. The Autonomous Community of Madrid (Spanish Comunidad Autónoma de Madrid) was created in 1982, and since then regional elections are held every 4 years.
The citizens of the Autonomous Communities of Spain do not elect a person for presidency of their community: but rather they elect the regional legislature, and that legislature elects the regional president. A candidate needs a majority (that is supposed to be loyal to him/her during the whole term) to be elected, but the top-voted party can be denied the right to form the government. This situation, though infrequent in nationwide elections, often happens in local/regional legislatures throughout Spain: the most usual coalition is between the Socialist Party (PSOE) and the United Left (IU).
In Madrid, such a coalition was formed in the 2nd term, in which the incumbent Socialist Joaquín Leguina obtained the most vote but not a majority,[1] once more in the 3rd term, allowing him to remain in office even after having obtained fewer votes than the People's Party (PP), and once more in the 6th term, by the PSOE candidate Rafael Simancas. However, this last coalition ultimately failed due to the dissidence of two PSOE Assembly Members, which denounced the pact with IU as being too wide and unrepresentative of the people's will due to the planned power balance. Elections were repeated after a few weeks and Partido Popular won, then by absolute majority.
Since then, the People's Party victories by absolute majority were repeated in 2007 and 2011's regional elections. After the resignation of President Esperanza Aguirre, nominally due to personal matters in late 2012, her deputy president Ignacio González held the post. The People's Party obtained the most votes in 2015 but lost its absolute majority. Its candidate Cristina Cifuentes was invested president after an agreement with Citizens.
She was replaced by her deputy Ángel Garrido when she resigned after evidence of both a fake master's degree and petty shoplifting came out.
^In fact, even the PSOE-IU coalition was in the minority (47 seats) against the centre-right parties PP and CDS (49), which however could not reach an agreement to rule. Once they did, a situation similar to the 6th term scandal arose, depriving those parties of the majority and allowing President Leguina to continue his minority government.