However, the results delivered a highly divided parliament, with no one party winning more than 29 percent of the vote. That will oblige him to form a coalition government, the first one in the history of Spanish modern democracy, if he wants to remain the prime minister. Here are the most important takeaways from the elections.

1. More lives than a cat

AD

Sánchez’s victory is a personal vindication. Five years ago he was unexpectedly elected party chairman in PSOE’s first party primaries. After that, his party was defeated in both the 2015 and 2016 general elections, when PSOE obtained the worst electoral results since 1936. The main regional leaders of the party forced him to resign — although he was reelected less than a year later, in the next primaries. In June 2018, he sponsored and won a vote of no confidence against the conservative prime minister — the first successful vote of no confidence in Spain’s history — with the support of the radical left, regionalist and pro-independence parties, even though his party had only 24 percent of the seats.

AD

No wonder he later published a book titled “Handbook for Survival.”

2. High voter turnout and defections from the PP to other rightist parties

AD

Sánchez won mainly for two reasons: high turnout (75.8 percent of the electorate) and the fragmentation of the rightist bloc.

Turnout was among the highest in the history of democratic Spain, six points higher than in the last legislative elections in 2016. Left-leaning voters mobilized heavily because they feared a right-of-center government supported by the radical right. So did supporters of regionalist parties, especially in regions like Catalonia, which have been strongly interested in seceding.

Traditionally, the right has benefited from Spain’s disproportional electoral system; rural areas elect more members of parliament per person than do urban areas, and rural voters tend to vote conservative. But this time the rightist parties did poorly. That’s because the powerful PP was once the only party on the right. Now the right-leaning vote divides among three different parties: center-right (Ciudadanos, or Cs), conservatives (PP) and radical nativists (Vox).

AD

AD

Many of PP’s usual voters are deeply dissatisfied with the party, for two reasons. First, PP has been embroiled in corruption scandals, including the illegal financing of the party. Second, they’re unhappy that the party did not manage to stop Catalonia’s 2017 referendum on whether to secede from Spain.

Overall, the rightist bloc got the same number of votes as the leftist bloc, with each side garnering around 43 percent. But PSOE and the radical-left Unidas Podemos (UP) won more seats in the lower house (165 vs. 147 seats) than did PP and its potential allies.

3. First coalition government since the democratic transition

Even though last week’s elections did not deliver a clear governing majority to any one party, PSOE is the only party situated to lead a government. A PSOE-Ciudadanos centrist coalition could deliver a coherent and stable majority, but the latter has already made clear that this is not an option. That’s because it’s trying to oust PP as the party leading the rightist bloc.

AD

AD

Sánchez will probably become prime minister with the support of UP and the abstention of moderate and pro-independence regionalist parties. PSOE might attempt to form a single-party minority cabinet, but it is very unlikely that UP would renounce its first real chance to get into the government.

This does not mean, however, that Sánchez will find governing easy. Several regional parties will probably support him, but they are likely to ask for more autonomy and funding in return. He may need support from at least one of the pro-independence regional parties to pass legislation or even the annual budget. If so, the new legislature might resemble the last one more than initially expected. Sánchez will have to bargain for support for every piece of legislation.

4. But wait — local, regional, and European Parliament elections are coming next

AD

AD

After the December 2015 election, no government formed and Spain was forced to hold new snap elections. That’s not likely to happen this time.

However, forming a government may take until June. That’s because on May 26, Spain holds elections for offices at the local, regional and European Parliament levels. These are perceived as a “second round,” signaling more about which party has the most popular support.

It’s possible that Sánchez could lose regional power. That would matter, because the regions control spending in key areas like education, health and other social services — reducing a PSOE-led central government’s capacity to deliver on its promises.

AD

5. Spain’s political landscape continues to fragment

Although the Spanish political system continues to be divided into two main blocs, each is now highly fragmented — the rightist bloc more than the leftist. The two parties that were once Spain’s main players — PSOE and PP — together barely attracted 45 percent of the votes. Regionalist parties have increased “blackmailing” power.

AD

The radical-right party Vox has finally broken through to join parliament — a sign of ideological polarization that’s increased to levels not seen since the Second Republic (1931-1939), which ended when General Franco won the Spanish civil war. This polarization will make it harder for the main political forces to find ways to compromise, especially on such divisive issues as Catalonia’s bid for independence.

Spain survived the 2008 Great Recession without much damage in large part because PSOE and PP collaborated to find mutually agreed-upon policies. Such cooperation is now much less likely. And yet UP’s losses and C’s gains are clear signs that voters are leaning toward moderation and pragmatism — signals that the new parliament may wish to heed.

Fernando Casal Bértoa is associate professor in comparative politics at the University of Nottingham in Britain.