2011 Spanish local elections
The 2011 Spanish local elections were held on Sunday, 22 May 2011, to elect all 68,230 councillors in the 8,116 municipalities of Spain and all 1,040 seats in 38 provincial deputations. The elections were held simultaneously with regional elections in thirteen autonomous communities, as well as local elections in the three foral deputations of the Basque Country and the eleven island councils in the Balearic and Canary Islands. The days before the elections were marked by the 2011 Spanish protests which had been held in different cities across Spain since 15 May. The elections resulted in  a landslide victory for the opposition People's Party (PP) and other centre-right parties, which won control of all of Spain's largest cities. In Barcelona, held by PSOE-sister party, the Socialists' Party of Catalonia (PSC), since the first local elections in 1979, was won for the first time by the nationalist Convergence and Union (CiU), which also won in Girona. The PSOE only won only in 5 out of Spain's 50 provincial capitals. In the popular vote, it scored its worst result in nationwide-held local elections, with a mere 27.8%, 10 points behind the PP , which obtained 37.5%. Following the election, the PSOE named Deputy Prime Minister Alfredo Pérez Rubalcaba as prime ministerial candidate for the next general election, initially scheduled for March 2012, and finally held in November 2011. Municipalities in Spain were local corporations with independent legal personality. They had a governing body, the municipal council or corporation, composed of the mayor, the government council and the elected plenary assembly. Elections to the local councils in Spain were fixed for the fourth Sunday of May every four years. Electoral system. Voting for the local assemblies was on the basis of universal suffrage, which  comprised all nationals over eighteen, registered and residing in the corresponding municipality and in full enjoyment of their political rights, as well as resident non-national European citizens and those whose country of origin allowed Spanish nationals to vote in their own elections by virtue of a treaty. Local councillors were elected using the D'Hondt method and a closed list proportional representation, with an electoral threshold of five percent of valid votes—which included blank ballots—being applied in each local council. Parties not reaching the threshold were not taken into consideration for seat distribution. Councillors were allocated to municipal  councils based on the following scale: Councillors of municipalities with populations below 250 inhabitants were elected under an open list partial block voting, with electors voting for individual candidates instead of parties: for up to four candidates in municipalities with populations between 100 and 250 inhabitants; and for up to two candidates in municipalities below 100. This did not apply to municipalities which, as a result of their geographical location or the convenience of a better management of municipal interests or other circumstances, made it advisable to be organized through the open council system (), in which voters would directly elect  the local major. The mayor was indirectly elected by the plenary assembly. A legal clause required that mayoral candidates earn the vote of an absolute majority of councillors, or else the candidate of the most-voted party in the assembly was to be automatically appointed to the post. In the event of a tie, a toss-up would determine the appointee. The electoral law allowed for parties and federations registered in the interior ministry, coalitions and groupings of electors to present lists of candidates. Parties and federations intending to form a coalition ahead of an election were required to inform  the relevant Electoral Commission within ten days of the election call, whereas groupings of electors needed to secure the signature of a determined amount of the electors registered in the municipality for which they sought election: Electors were disallowed from signing for more than one list of candidates. Provincial deputations were the governing bodies of provinces in Spain, having an administration role of municipal activities and composed of a provincial president, an administrative body, and a plenary. Basque provinces had foral deputations instead—called "Juntas Generales"—, whereas deputations for single-province autonomous communities were abolished: their functions transferred to the  corresponding regional parliaments. For insular provinces, such as the Balearic and Canary Islands, deputations were replaced by island councils in each of the islands or group of islands. For Majorca, Menorca, Ibiza and Formentera this figure was referred to in Spanish as "consejo insular" (), whereas for Gran Canaria, Tenerife, Fuerteventura, La Gomera, El Hierro, Lanzarote and La Palma its name was "cabildo insular". Most deputations were indirectly elected by local councillors from municipalities in each judicial district. Seats were allocated to provincial deputations based on the following scale: Island councils and foral deputations were elected directly by electors under their  own, specific electoral regulations. Municipal elections. City control. The following table lists party control in provincial capitals, as well as in municipalities above or around 75,000. Gains for a party are highlighted in that party's colour. Provincial deputations. Deputation control. The following table lists party control in provincial deputations. Gains for a party are highlighted in that party's colour.