A general election was held in Spain on 20 November 2011 to elect the members of the 10th under the Spanish Constitution of 1978. All 350 seats in the Congress of Deputies were up for election, as well as 208 of 266 seats in the Senate. It was held four months ahead of schedule, and was noted for coinciding with the 36th anniversary of the death of dictator Francisco Franco.

The second term of Prime Minister José Luis Rodríguez Zapatero was quickly overshadowed by the impact of the Great Recession in Spain, aggravated by the Spanish property bubble's crash that led to a real-estate crisis. Unemployment reached record highs as public deficit and bond yields soared, with the popularity of Zapatero's government and his ruling Spanish Socialist Workers' Party (PSOE) plummeting after being forced to U-turn in economic policy and adopt tough austerity measures and spending cuts, as well as a 2011 constitutional reform introducing a balanced budget amendment. Concurrently, the curtailment of the Catalan Statute of Autonomy by the Constitutional Court of Spain in 2010 sparked protests and helped fuel pro-independence sentiment in the region. Despite the economic outlook, the government still attempted to push through some measures in its social agenda, such as a liberalization of abortion laws.

Growing discontent saw a general strike in September 2010, an air traffic controllers' strike in December 2010 (which led to the first use of emergency powers since 1975), and the onset of the anti-austerity movement in Spain in May 2011. This, together with consistent opinion polling leads for the opposition People's Party (PP) under Mariano Rajoy—who had survived a plot to overthrow him during a 2008 party congress—materialized in the PSOE's collapse in the 2011 local and regional elections. Zapatero quit seeking a third term in office, with the first deputy prime minister, Alfredo Pérez Rubalcaba, being selected as PSOE candidate unopposed. Mounting political and economic pressure forced Zapatero to call a snap election for November 2011. During this period, the separatist ETA group announced a permanent ceasefire and subsequent cessation of all armed operations, turning the election into the first since the Spanish transition to democracy without ETA activity.

Under falling voter turnout, the election saw the PSOE being swept out from power in the worst defeat for a sitting Spanish government up until that time since 1982, losing four million votes in its worst performance since 1977, Rajoy's PP won in a landslide, beating José María Aznar's result in 2000; it was also the second largest and, to date, last single-party absolute majority in a nationwide Spanish election. The left-wing United Left saw a turnaround of its electoral fortunes with its first remarkable increase in fifteen years, whereas centrist Union, Progress and Democracy exceeded expectations with over one million votes, five seats and just short of the five percent threshold required for being recognized a parliamentary group in Congress. The nationalist Convergence and Union topped the poll in Catalonia for the first time ever, whereas the abertzale left platform Amaiur achieved a major breakthrough in both the Basque Country and Navarre. Rajoy was subsequently elected as prime minister of Spain, forming a majority government after eight years in opposition.

Background

The 2008 general election brought a second consecutive victory for the Spanish Socialist Workers' Party (PSOE), which fell seven seats short of an overall majority. Declining to form a coalition or seek confidence and supply agreements with smaller parties, José Luis Rodríguez Zapatero was re-elected as prime minister of Spain on the second ballot of investiture and went on to form the first female-majority cabinet in Spain's history. By then, the Spanish economy was already showing signs of fatigue and slowing after a decade of growth.

The defeat of the opposition People's Party (PP) led some internal factions and conservative media to question Mariano Rajoy's leadership. After fending off a challenge from the Madrilenian president, Esperanza Aguirre, Rajoy was re-elected at the July 2008 PP congress, but the internal crisis continued for months amid several political scandals. In early 2009, El País unveiled an alleged plot by the Madrid regional government to spy on Aguirre's political rivals. Soon after, the Spanish National Court opened a judicial probe into the Gürtel affair, which implicated the PP—especially its Madrid and Valencia branches—in a bribery, money laundering, and tax evasion scheme. Investigations were delayed due to the examining magistrate, Baltasar Garzón, being tried for violating lawyer-client privilege through wiretapping, while criticism over a hunting trip with him prompted the resignation of the justice minister, Mariano Fernández Bermejo. The PP victories in the 2009 Galician and European Parliament elections helped reassert Rajoy's authority within his party amid voters' growing economic concerns.

The impact of the Great Recession in Spain dominated Zapatero's second term, with early criticism focused on his delay in acknowledging the crisis and acting sooner. Worsening forecasts and rising fuel prices pushed the government to approve a first stimulus package based on tax rebates and the removal of the wealth tax, while a truck drivers' strike erupted in June 2008. The crash of the Spanish property bubble triggered a real-estate crisis, and the July 2008 bankruptcy of Martinsa-Fadesa became Spain's largest corporate default. A second stimulus package in August included further tax deductions, the opening up of the services sector, red tape cuts for small and medium enterprises (SMEs), and simplified environmental plan requirements. The bankruptcy of Lehman Brothers in September deepened the global financial crisis and caused historic losses for the Madrid Stock Exchange. By the end of 2008, Spain had entered recession, with inflation and unemployment surging. The Spanish government's €50-billion "Plan E" public works program failed to meet its goals and drew criticism for its unsustainable spending. A banking crisis forced the state bailout of several failing savings banks, with the FROB being established to manage restructuring. In April 2009, Pedro Solbes was replaced by Elena Salgado as economy and finance minister, and further austerity measures—including tax hikes (particularly VAT) and cuts in non-essential spending—were introduced to contain the growing public deficit.

Zapatero's government initially tried to avoid cutting social security and welfare state policies, but the rising deficit and unemployment, together with fears of contagion from the Greek government-debt crisis (in turn threatening a euro area crisis), forced Zapatero to announce emergency measures on 12 May 2010 aimed at preventing a sovereign default and bailout; these included cuts to civil servants' wages and dependency spending, a pension freeze and the removal of birth allowances. A labour reform followed, introducing incentives to youth employment, decentralizing collective bargaining, and reducing severance payments for layoffs. These U-turns caused approval ratings for both Zapatero and the PSOE to collapse, as well as a general strike in September 2010. Zapatero attempted to regain political initiative with a major cabinet reshuffle in October, but his government had to deal with an air traffic controllers' strike in December 2010, which led to a state of alarm (the first since the Spanish transition to democracy). Rising bond yields and threats to Spain's credit ratings prompted further measures, including the partial privatizations of AENA and the State Lotteries, higher tobacco taxes, limits on unemployment benefits, and a tax cut for SMEs. A pension reform saw the compulsory retirement age rising from 65 to 67 years. Growing discontent with austerity culminated in the 15-M Movement in May 2011, also known as "the indignant ones" (), which would spark protests, demonstrations and occupations in Spain in the ensuing years.

Domestically, the government dealt with the 2008 Spanair plane crash, the 2009 swine flu pandemic, and outrage over the 2009 hijacking of fishing trawler Alakrana to piracy off the coast of Somalia. It promoted a new abortion law based on a time limits-scheme (no conditions until the 14th week, and up to the 22nd week in cases of pregnancy complications), while also removing parental consent for minors aged 16–17. During this period, the government adopted a new regional financing model, laws on sustainable economy and internet copyright infringements (the controversial Sinde Law), and a major Criminal Code reform that introduced harsher penalties for terrorism, sex crimes and real-estate corruption. In 2010, a ruling by the Constitutional Court curtailed the Catalan Statute of Autonomy—following a PP appeal—sparking protests in the region and fueling a sovereigntist and, ultimately, pro-independence movement. Economic hardship also contributed to the fall of the tripartite government in the 2010 Catalan election and the victory of Artur Mas's Convergence and Union.

ETA group's activity, weakened by police blows to the group's capabilities, still saw a 2008 attack on the EITB offices, and the Burgos and Palma Nova bombings in 2009. ETA's first murder of a French policeman in March 2010 also became its last, as it announced a ceasefire in September 2010, declared permanent in January 2011. A judicial investigation uncovered a tip-off during the 2006 ceasefire that had delayed the dismantling of an ETA extortion network (the so-called Faisán affair); the opposition PP tried to link the case to the interior minister, Alfredo Pérez Rubalcaba, but only two police officers were ultimately tried and convicted. Concurrently, the Supreme and Constitutional courts banned several parties with alleged ties to the outlawed Batasuna, including the Communist Party of the Basque Homelands; the Basque Nationalist Action, several groups formed to contest the 2009 Basque election (D3M and Askatasuna), and Sortu. The Constitutional Court allowed the abertzale left to contest the 2011 local elections under the Bildu banner, which achieved a major electoral breakthrough.

On 2 April 2011, Zapatero announced that he would not seek a third term as prime minister, but his initial plan to hold a party primary to choose a successor was scrapped following the PSOE's heavy defeats in the 2011 local and regional elections. Defence minister and likely contender Carme Chacón withdrew from the race in favour of Rubalcaba, who became the party's prime ministerial candidate unopposed. The final months of Zapatero's term were marked by a constitutional reform in the summer of 2011 introducing a balanced budget amendment, and his decision to bring forward the general election to 20 November in response to mounting political and economic pressure.

Overview Under the 1978 Constitution, the Spanish were conceived as an imperfect bicameral system.. summarizing . The Congress of Deputies held greater legislative power than the Senate, having the ability to grant or withdraw confidence from a prime minister and to override Senate vetoes by an absolute majority.. Nonetheless, the Senate retained a limited number of specific functions—such as ratifying international treaties, authorizing cooperation agreements between autonomous communities, enforcing direct rule, regulating interterritorial compensation funds, and taking part in constitutional amendments and in the appointment of members to the Constitutional Court and the General Council of the Judiciary—which were not subject to override by Congress..

Date