Local elections were held in Spain on 22 May 2011 to elect all 68,230 councillors in the 8,116 Spanish municipalities (including 50 seats in the assemblies of the autonomous cities of Ceuta and Melilla), all 1,193 provincial seats in 41 provinces (including 38 indirectly-elected provincial deputations and the three foral deputations in the Basque Country) and 229 seats in ten island councils (seven Canarian and four Balearic ones). They were held concurrently with regional elections in thirteen autonomous communities.

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.

Overview Local government

Under the 1978 Constitution, the governance of municipalities in Spain was centered on the figure of city councils (), local corporations with independent legal personality composed of a mayor, a government council and an elected legislative assembly.; . The mayor was indirectly elected by the local assembly, requiring an absolute majority; otherwise, the candidate from the most-voted party automatically became mayor (ties were resolved by drawing lots).; . The concejo abierto system (), under which voters directly elected the local mayor by plurality voting, was reserved for some minor local entities.; .

Provincial deputations were the governing bodies of provinces in Spain—except for single-province autonomous communities—having an administration role of municipal activities and composed of a provincial president, an administrative body, and a plenary.; . 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 Gran Canaria, Tenerife, Fuerteventura, La Gomera, El Hierro, Lanzarote and La Palma, this figure was referred to in Spanish as cabildo insular, whereas for Mallorca, Menorca, Ibiza and Formentera, its name was consejo insular ().; . The three Basque provinces had foral deputations instead (called General Assemblies, or Juntas Generales).; ; .

Date The term of local assemblies in Spain expired four years after the date of their previous election, with election day being fixed for the fourth Sunday of May every four years. The election decree was required to be issued no later than 54 days before the scheduled election date and published on the following day in the Official State Gazette (BOE).; . The previous local elections were held on 27 May 2007, setting the date for election day on the fourth Sunday of May four years later, which was 22 May 2011.

Local assemblies could not be dissolved before the expiration of their term, except in cases of mismanagement that seriously harmed the public interest and implied a breach of constitutional obligations, in which case the Council of Ministers could—optionally—decide to call a by-election..

Elections to the assemblies of local entities were officially called on 29 March 2011 with the publication of the corresponding decree in the BOE, setting election day for 22 May.. Subsequent by-elections were called on 27 September, for 20 November.

Electoral system Voting for local assemblies and island councils was based on universal suffrage, comprising all Spanish nationals over 18 years of age, registered and residing in the municipality or council and with full political rights (provided that they had not been deprived of the right to vote by a final sentence, nor were legally incapacitated), as well as resident non-national European citizens, and those whose country of origin allowed reciprocal voting by virtue of a treaty.; ; ; ; .

Local councillors were elected using the D'Hondt method and closed-list proportional voting, with a five percent-threshold of valid votes (including blank ballots) in each constituency.; ( by ). Each municipality or council was a multi-member constituency, with a number of seats based on the following scale:.

Population Councillors Municipalities Canary Islands Balearic Islands <100 3 No island below 5,000inhabitants Fixed number:Ibiza: 13Menorca: 13Mallorca: 33Formentera: Same as homonymous city council 101–250 5 251–1,000 7 1,001–2,000 9 2,001–5,000 11 5,001–10,000 13 11 10,001–20,000 17 13 20,001–50,000 21 17 50,001–100,000 25 21 >100,001 +1 per each 100,000 inhabitants or fraction+1 if total is an even number

Councillors in municipalities below 250 inhabitants were elected using open-list partial block voting, with voters in constituencies between 101 and 250 inhabitants choosing up to four candidates; and in those below 100, up to two..

Most provincial deputations were indirectly elected by applying the D'Hondt method and a three percent-threshold of valid votes to municipal results—excluding candidacies not electing any councillor—in each judicial district. Seats were allocated to provincial deputations based on the following scale (with each judicial district being assigned an initial minimum of one seat and a maximum of three-fifths of the total number of provincial seats, with the remaining ones distributed in proportion to population):.

Population Seats <500,000 25 500,001–1,000,000 27 1,000,001–3,500,000 31 >3,500,001 51

The General Assemblies of Álava, Biscay and Gipuzkoa were directly elected by voters under their own, specific electoral regulations..

The law did not provide for by-elections to fill vacant seats; instead, any vacancies arising after the proclamation of candidates and during the legislative term were filled by the next candidates on the party lists or, when required, by designated substitutes..

Parties and candidates The electoral law allowed for parties and federations registered in the interior ministry, alliances and groupings of electors to present lists of candidates. Parties and federations intending to form an alliance were required to inform the relevant electoral commission within 10 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, disallowing electors from signing for more than one list:.

At least one percent of the electors in municipalities with a population below 5,000 inhabitants, provided that the number of signers was more than double that of councillors at stake. At least 100 signatures in municipalities with a population between 5,001 and 10,000. At least 500 signatures in municipalities with a population between 10,001 and 50,000. At least 1,500 signatures in municipalities with a population between 50,001 and 150,000. At least 3,000 signatures in municipalities with a population between 150,001 and 300,000. At least 5,000 signatures in municipalities with a population between 300,001 and 1,000,000. At least 8,000 signatures in municipalities with a population over 1,000,001.

Additionally, a balanced composition of men and women was required in the electoral lists, so that candidates of either sex made up at least 40 percent of the total composition..

Opinion polls

Results Municipal Overall