The conservative People's Party (PP) of Prime Minister Mariano Rajoy won Spain's general election on Sunday, exit polls showed, although it fell short of an absolute majority and will have to rely on other parties if it is to govern for another four-year term. The PP is seen winning between 114 and 124 seats in the 350-strong parliament, 52 to 62 seats short of the 176 seats needed for an absolute majority.
The opposition Socialists are seen coming second with 79 to 85 seats while newcomer parties anti-austerity Podemos and liberal Ciudadanos would come third and fourth respectively.
Podemos would garner between 70 and 80 seats and Ciudadanos would win between 46 and 50 seats, the exit polls showed.
With many people saying they want to shake up a political system they consider corrupt and unable to tackle economic troubles, the outcome is the most uncertain in decades.
About one in three of the 36.5 million eligible voters have said they would decide whom to support only at the very last minute.
Although long queues were seen at polling stations across Spain, the turnout at 1300 GMT was 36.9 percent, slightly below the 37.9 percent registered in the last general election in 2011 - when the final turnout was one of the lowest since the end of Francisco Franco's fascist dictatorship in the 1970s.
Analysts, most of whom have portrayed this election as the second leg of Spain's unfinished transition to democracy 40 years ago, had expected a high turnout on Sunday.
Since 1977, Spain has always enjoyed stable parliamentary majorities at the national level, with the centre-right People's Party and the centre-left Socialist Party alternating in power.
But a more splintered political landscape is now emerging and could now complicate efforts to form a government.
"The two-party system is coming to an end," said Victor Beltran, a 26-year-old engineering student, after voting for upstart anti-austerity party Podemos in the Tetuan neighbourhood in Madrid.
"I know that the party I voted for will not get a majority but I want to see how the parliament works with several strong parties that have to reach consensus," he said.
Opinion polls suggest the ruling conservative People's Party (PP) of Prime Minister Mariano Rajoy will win the vote but fall well short of an absolute majority.
The Socialists are expected to come second, while anti-austerity party Podemos ("We Can") and a second significant newcomer, the liberal Ciudadanos ("Citizens"), are vying for third place as kingmaker in post-election talks.
That prediction makes any of four outcomes possible - either a centre-right pact between the PP and Ciudadanos, a centre-left alliance between the Socialists and Podemos, a coalition between the Socialists and Ciudadanos or a minority administration.
Rajoy said on Wednesday he would consider a cross-party pact to ensure a stable administration over the scheduled four-year term, but all the other main parties have come out against joining the PP in a coalition.
That points to a stalemate that analysts agree would probably disrupt an economic reform programme that has helped pull Spain - the fifth-largest economy in the 28-nation EU - out of recession and dented a still sky-high unemployment rate.
"If there is no majority and many parties have a say, that could be a bit of a mess," said Josefa Robledillo, 50, a housewife from the Aluche district of Madrid who voted for the PP. "I hope that now that the economy is going a little better, things will stay on track."
Ciudadanos and Podemos insiders say both parties are looking beyond Sunday's vote and aim to keep poaching voters from the PP and the Socialists, giving them no incentive to agree on a pact unless they win major concessions.
The Spanish constitution does not set a specific deadline to form a government after the election. Analysts say negotiations to win enough parliamentary support for a new prime minister to be picked could last many weeks - and maybe even trigger another election.