Spain’s governing Socialist party won the most votes in elections held Sunday but fell short of an overall majority in a highly fragmented outcome in which the conservative vote split three ways. Surging far right and centrist groups seriously undercut what was until now the main opposition, the Popular Party.

“The Socialist party has won the elections. The future has won and the past has lost,” Prime Minister Pedro Sanchez told supporters outside his party headquarters in Madrid. He hinted at a possible governing arrangement with center-right parties, which have been bitter rivals leading up to the election.

With 99% of votes counted, the Spanish Socialist Workers’ Party (PSOE) is headed to a victory with an estimated 28% of the popular vote, giving it an estimated 123 seats in the 350-seat parliament, which is 40 more than it had. But the Popular Party (PP), which received less than 17% of votes, is losing almost half its seats, dropping from 137 to 65.

The centrist Ciudadanos party, which is barely 1 percentage point behind the Popular Party, has increased its representation to 57 seats. The far right Vox Party, however, fared worse than expected, receiving about 10% of the votes, giving it about 25 seats — its first in parliament.​

The far left Unidos Podemos also did poorly, with its projected parliamentary representation dropping, from 70 to 42.

“The mood of the country indicates a swing towards the center” political analyst Ramon Peralta, a law professor at the Complutense University of Madrid. “The three-way division of the right clearly hurt PP, with many of its votes going to Vox.”

Peralta projects a possible coalition between PSOE and Ciudadanos, despite bitter rhetoric exchanged between their leaders during the campaign, in which Ciudadanos candidate Albert Rivera called the prime minister a traitor for negotiating with Catalan separatists and vowed not to support a new mandate for the socialists.

The results, however, give no hope for a conservative dream coalition between PP, Ciudadanos and Vox, which had been openly discussed by the leaders of the three parties.

The numbers also show that Prime Minister Sanchez could continue with his current governing arrangement, counting on the parliamentary support of Podemos, Catalan secessionists and Basque nationalists, which also have increased their representation in the national parliament.

VOX leader Santiago Abascal defiantly told supporters outside his party headquarters in Madrid, “Spain may be worse off after the elections, but Vox will be in the parliament for the first time, and there will be 24 deputies that fight to defend Spain’s unity and basic values.”

PP had little to celebrate. “Things have gone very badly,” PP spokesman and congressional candidate Javier Fernandez Lasquetty told VOA.

“We are paying a very high price for a fragmented right,” he said.

Ciudadanos leader Rivera, whose party almost overtook PP, told supporters his centrist option “keeps growing.” However, he discounted any possible deal with Sanchez.

Analysts say Sanchez is more likely to look to his right for parliamentary support, as the far left Podemos party no longer seems a viable partner after losing half its seats.

The Catalan leftist separatist party ERC, led by secessionist President Quim Torra, gained support over more-moderate parties in Catalonia, making any parliamentary coalition with Spain’s central government difficult to sustain.

The Basque Nationalist Party and the radical separatist Bildu, composed of some former supporters of the terror group ETA, also increased their representation in parliament, each gaining a seat.