The outcome of the
November 2019 general election led the
Spanish Socialist Workers' Party (PSOE) and the
Unidas Podemos alliance to set aside their differences and reach a preliminary deal within days. After securing the consent of the
Republican Left of Catalonia (ERC)—despite tensions following the
Supreme Court's
prison sentences to
Catalan independence leaders and the
Spanish government's handling of the
October 2019 protests—
Pedro Sánchez was re-elected
prime minister in January 2020, forming
Spain's first nationwide
coalition cabinet since the
Second Republic, with
Podemos leader
Pablo Iglesias as
second deputy prime minister. saw
Prime Minister Pedro Sánchez declaring a
state of alarm together with
nationwide lockdown on 12 March 2020, in order to "
flatten the curve" and prevent the
Spanish National Health System from being overwhelmed. From March 2020,
Sánchez's government had to deal with the outbreak of the
COVID-19 pandemic, declaring a
state of alarm and imposing
nationwide lockdown to curb the spread of the virus ("
flattening the curve"). The
National Health System was quickly overwhelmed and the country saw high infection and death rates, especially in
nursing homes. The sudden halt of non-essential economic activity triggered a
recession, prompting the government to approve several relief packages known as the "social shield".
Anti-lockdown protests emerged in May 2020, particularly in the wealthiest areas of the
Madrid region, which had been the hardest hit in the country. Although restrictions were lifted by the summer, later waves of infections led to new limits and
curfews, including a partial lockdown of Madrid in September and a six-month state of alarm that gave regions more control over restrictions. The authorities' initial
response was widely criticized as slow and ineffective, and in 2021 a divided
Constitutional Court ruled the two states of alarm unlawful, arguing that a
state of exception—requiring prior, rather than later, parliamentary approval to enforce lockdowns—should have been used instead. Spain became the second-largest recipient of the
Next Generation EU recovery funds after successful negotiations, and the government presented a national plan focused mainly on
energy and
digital transitions. This period also saw reconstruction efforts in
La Palma after the
2021 Cumbre Vieja volcanic eruption; Spain's participation in
military aid to Ukraine following the
2022 Russian invasion; and an
inflation surge that triggered an
global energy crisis, which saw the
European Commission granting Spain a temporary mechanism to cap gas prices (the "
Iberian exception"). Other major events included the
2022 Melilla incident—in which 37 migrants died in a
crowd crush—the
2022 NATO summit in Madrid, and Spain's
presidency of the Council of the European Union in 2023. A major
cabinet reshuffle in July 2021 saw the departure of several senior PSOE figures such as
Carmen Calvo and
José Luis Ábalos from the government. In an attempt to ease tensions from the
2017–2018 Catalan crisis, Sánchez granted partial
pardons to jailed pro-independence leaders in June 2021. His government also passed a major
labour market reform (limiting
temporary employment and strengthening
collective bargaining) in a narrow 175–174 vote, seeing a decisive voting mistake by a PP member. Social reforms saw the legalization of
euthanasia, the "
Trans Law" allowing
gender self-identification, and a reform of the
abortion law that expanded
rights and introduced paid
menstrual leave. A new
Education Law (the LOMLOE) was approved to reduce
school segregation and limit
grade retention, while a
Democratic Memory Law sought to provide justice for victims of
Franco's dictatorship.
Animal welfare legislation was expanded, though the exclusion of
hunting dogs and
bullfighting drew criticism. Among the most controversial bills were an overhaul of the
sedition and
embezzlement offences—seen by the opposition as a concession to Catalan parties—and the
"Only Yes Means Yes" sexual consent law, which contained a loophole that led to reduced sentences for hundreds of offenders. Concurrently, the ongoing
blockade of the judiciary council (which stalled judicial appointments for years) prompted attempts at judicial reform, which triggered an institutional crisis in December 2022 when the Constitutional Court temporarily blocked the passage of the proposed legislation. Seeking to counter competition from the
far-right Vox party under
Santiago Abascal and to attract former
Citizens (Cs) voters, the opposition
People's Party (PP) adopted a confrontational stance toward Sánchez. The
Madrid regional government of
Isabel Díaz Ayuso—criticized for its
triage protocols and selective lockdown measures during the pandemic—frequently clashed with the national government. Ayuso's polarizing profile made her one of Sánchez's main political rivals, culminating in a
snap Madrid election in May 2021 in which she achieved a decisive victory and severely weakened Cs. This success also triggered a conflict with PP leader
Pablo Casado over control of the
regional party, which escalated after disappointing results in the
2022 Castilian-Leonese election and Ayuso's accusations that Casado was trying to undermine her through a
smear campaign. The crisis eventually led to Casado's removal and the
election of
Galician president Alberto Núñez Feijóo as new PP leader in a show of unity. This period also saw the exposure of the so-called Kitchen case, an alleged police
espionage and
deep state network operated by the
interior ministry during
Rajoy's premiership. With influence over several regional PP–Cs governments formed after the
2019 regional elections, Vox pushed for some of its most controversial proposals, including a "parental pin" in
Murcia (allowing parents to veto school activities they considered "contrary to moral principles"), and an
anti-abortion plan in
Castile and León that would have required doctors to pregnant women the chance to hear the
fetal heartbeat or undergo a
4D ultrasound (ultimately dropped to prevent a constitutional conflict). Amid growing
political polarization, and seeking to capitalize on anti-lockdown protests and public anger at the Spanish government, Vox tabled two
no-confidence motions against Sánchez in
2020 and
2023. Both failed by wide margins, but they highlighted the PP's shift from outright opposition under Casado in the first to a conciliatory abstention under Feijóo in the second. Pablo Iglesias resigned from the government to run against Ayuso in the 2021 Madrid election, but his poor result led him to leave politics.
Labour minister Yolanda Díaz then emerged as his likely successor as his alliance's candidate for prime minister, using her popularity to reorganize Unidas Podemos by bringing together several left-wing parties—such as
En Comú Podem,
Compromís and
Más Madrid/
Más País—under the
Sumar umbrella (). The case in March 2023 (a
cash-for-favours scheme involving a PSOE
lawmaker from the
Canary Islands), controversy over
EH Bildu including former
ETA members on its candidate lists, and a
vote-buying scandal (particularly affecting
Melilla), complicated the political landscape and contributed to losses for left-wing parties in the
May 2023 local and
regional elections. This prompted Sánchez to call a surprise
snap election for 23 July, a move widely seen as an attempt to catch the opposition off guard and avoid a prolonged
lame-duck period. ==Overview==