Spain's political right is fractured. The traditional conservative Popular Party suffered a humiliating defeat, while the election marked the rise of the far-right and a high point for an expanding center-right party.
The results did little to dispel government uncertainty in the eurozone's No. 4 economy. It could take weeks or months for Spain's political future to become clear, said Andrew Dowling, an expert on contemporary Spanish politics at Cardiff University in Wales.
"If the Socialist party wants to stay in power for the next four years, it needs to find mechanisms of accommodation to ensure a degree of stability," he said. Sánchez hailed his center-left party's victory as an antidote against a reactionary wave of national populism, pledging to help strengthen the European Union.
But the Socialist party won only 29% of the vote, and it still needs to make tough political decisions in order to govern. With only 123 seats in the 350-seat Congress of Deputies, Spain's parliament, the Socialists will need to negotiate the support of smaller rival parties to pass legislation.
Even an alliance with the far-left, anti-austerity party United We Can — the most obvious potential partner — wouldn't give the Socialists the 176 seats it needs. There are other options, however. Deputy Prime Minister Carmen Calvo said Monday she believed the election result, which increased the Socialists' parliamentary seats from 85 to 123, was "more than enough" of a public endorsement to allow the party to rule alone as a minority government.
Spain's Socialists have also noted the success of the ruling Socialist Party in neighboring Portugal, where the minority government has an understanding with other left-of-center parties which provide support by often voting with it in parliament.
There is a difference, however: In Spain, the Socialist party came to power last June in a minority government and lasted less than a year after opposition parties, including Catalonia's separatists, refused to endorse its public-spending plan.
Another possibility is a broad centrist alliance with the center-right Citizens party, which shot from 32 to 57 parliamentary seats in the election. But Citizens party leader Albert Rivera has in the past ruled out any arrangement with Sánchez and has in many aspects been hostile to the Socialists' political agenda.
On Monday, party spokeswoman Inés Arrimadas again rejected talks to back Sánchez, while presenting Citizens as the leading force in the opposition. Another unpredictable path that Sánchez could consider is to seek the support of secessionists in Catalonia.
The unflagging demands of separatists for that wealthy region's independence led in 2017 to Spain's worst constitutional crisis in decades, and the price of their support may be too high for Sánchez. Much of the uncertainty stems from how Spain's political landscape has fragmented in recent years, after decades in which the Socialist party and the conservative Popular Party took turns in power.
Forging cross-party alliances has proved difficult and has unsettled Spanish governments. In 2015, a splintered parliamentary outcome from a general election led to inconclusive negotiations and a repeat election the following year.
"The country has endured an excessive amount of instability," La Vanguardia newspaper said in an editorial Monday. "That is never good. And it's even worse when the European Union has the same problem, due to Brexit and the rise of populism."
The Popular Party lost more than half of its parliamentary representation as it fell to 66 seats. Adding to the parliamentary makeover, the far-right Vox party claimed 10% of the vote and 24 seats. It is the first time since the 1980s that a far-right party will sit in the national parliament, although Vox didn't win as many votes as some polls had forecast.
In all, five parties got more than 20 seats. Referring to the anti-migrant Vox, Sánchez said the election's message to Europe was that "you can win against authoritarianism and regression." "We will form a pro-European government to strengthen Europe, not weaken it," he vowed.
Amid all the political maneuvering, the new government faces the daunting task of cutting chronic unemployment and keeping the public pension system from collapse. The Spanish jobless rate in February was almost 14% — compared with an average of just under 8% for eurozone countries.
José Luis Abalos, a close aide to Sánchez, said Monday that the Socialists are not in a rush to form a government and their immediate focus will be on campaigning for regional and local government elections, as well as European Parliament elections on May 26, in what will be another test of political strength.
After Sunday's vote, Spain has emerged as "the most solid social democracy in Europe" and "an example against the threat of the advances made by populists and the extreme right," Abalos said.
Hatton reported from Lisbon, Portugal.