MADRID • Spain entered uncharted political territory after Prime Minister Mariano Rajoy lost his majority in an inconclusive election that saw voters shift allegiance to new groups at the expense of the two main parties.
Mr Rajoy's Popular Party (PP) lost a third of its lawmakers even as it beat out the Socialists to take the most votes and earn the first shot at forging a government.
With Spanish voters rewarding newcomers from the anti-austerity Podemos and the liberal Ciudadanos parties, who between them took 109 seats in the 350-member Parliament, no clear governing majority emerged from Sunday's ballot.
"The field is really open," said political science professor Pablo Simon of Carlos III University in Madrid.
"We are heading for very long negotiations since the two blocs are virtually tied."
LONG ROAD TO STABILITY AS PARTIES JOSTLE FOR POWER
Spain is looking at a drawn-out period of talks between as many as 10 different parties after Sunday's general election produced the most divided Parliament of the democratic era, with no obvious governing alliance.
Under Spanish law, a party leader needs to win an outright majority in the 350-seat chamber to be elected prime minister at the first attempt.
In subsequent rounds, it is enough to win the most votes, so tactical abstentions can help a candidate get over the line.
The new Parliament must be called by Jan 13.
Once the session begins, lawmakers have two months to elect a government. If they fail, the acting prime minister has to call a new election.
So where do we go from here?
Prime Minister Mariano Rajoy's Popular Party (PP) forms a government
• Mr Rajoy needs the main opposition Socialists to help him if he is to serve another term. He will need their backing in the first round but an abstention would be enough in the second, if the Ciudadanos party agrees to stand aside. An abstention from the liberals of Ciudadanos is not enough as the Socialists and the far-left Podemos could still block Mr Rajoy.
A Socialist-led administration
• The Socialists could lead a coalition of left wing-parties, including Podemos and United Left. Those three parties have 161 seats between them, but they could in theory get to a majority of 176 by adding support from nationalist groups who have 26 seats between them.
Even an abstention from the nationalists would be enough to let that alliance through.
• The Socialists and Ciudadanos have only 130 seats between them, so a more centrist government would require the PP to abstain.
• If no one can agree on who should govern, Spaniards could be asked to vote all over again in the first half of next year.
Spain joined a global backlash against establishment politics as voters opted to challenge a two-party system that has seen the PP and the Socialists alternate in power for the past 33 years.
The splintering of political sentiment leaves no one party in a position to govern, risking instability and a market backlash.
The Spanish Constitution does not set a specific deadline to form a government after the election.
Analysts say negotiations to secure enough parliamentary support for a new prime minister could go on for weeks - and maybe trigger another election.
The coalition talks will be difficult "given the animosity between the parties", Mr Vincenzo Scarpetta, a London-based policy analyst at Open Europe, wrote in an e-mail.
"At best, Spain will end up with a weak government. At worst, Spaniards might have to head to the polls again soon."
Socialist leader Pedro Sanchez, in an address to party supporters late on Sunday, congratulated Mr Rajoy and his party "for being the first political force in Spain" and said they had earned the first chance at trying to form a government.
At the same time, he stressed that voters had made clear their desire for change.
"Spain wants the left," said Mr Sanchez.
"The Spanish people have made something else clear: That a new political era is beginning in Spain."
While Mr Rajoy celebrated his victory, he gave a cautious message to his supporters, saying: "I will try to form a government, and I believe Spain needs a stable government."
Mr Rajoy's conservatives and the main opposition Socialists together won 50.7 per cent of the votes, their lowest combined total and down from 73.4 per cent in 2011.
In Madrid on Sunday, Mr Nabil Edriss Sanchez, a broker, said he cast his ballot for the PP while holding his nose because of what he called "a horrendous level of corruption".
Still, he argued that the PP was best placed to guarantee political stability, which is "what the financial markets want", and avoid the risk of a left-wing coalition led by the Socialists.
The Socialists failed to shake off the legacy of their previous time in office, when they led Spain into recession and soaring joblessness.
The party has also been entangled in corruption allegations, including a court investigation into the embezzlement of public funds earmarked for the unemployed.
An unexpected surge from upstart anti-austerity party Podemos, which now partly holds the key to power, is the latest example of rising populist forces in Europe at the expense of mainstream centre-right and centre-left parties.
In the aftermath of the financial crisis and a raft of corruption allegations against the establishment parties, Podemos and Ciudadanos emerged to challenge their hegemony, mirroring the disruption of traditional politics in many western democracies, from Mr Donald Trump and Mr Bernie Sanders in the United States to Mr Alexis Tsipras in Greece and France's Marine Le Pen.
The result in Spain suggests that the only party able to form a majority with Mr Rajoy would be his historical rivals, the Socialists - but a senior Socialist Party member ruled out a so-called grand coalition on Sunday.
The PP and Ciudadanos together are 13 seats short of the 176 seats needed for a majority.
The Socialists, Podemos and another anti-austerity platform, Unidad Popular, fell 15 seats short, although they might yet attract extra support from some nationalist groups.
"The only way to a stable situation would be a grand coalition in the German style," Mr Jose Ramon Pin, professor of public administration at the Barcelona-based IESE business school, said in an interview. "But it is hard to see that happening."
BLOOMBERG, REUTERS, NEW YORK TIMES