Spain’s governing conservative party has won the most seats in the general election but has fallen short of a majority.
With almost all votes counted, the Popular Party was on 28.7%; the Socialists on 22% and anti-austerity Podemos 20.6%.
The liberal Ciudadanos party had 13.8% of the vote.
Podemos and Ciudadanos fielded national candidates for the first time, boosted by disillusion among the electorate.
The PP and the Socialists have alternated running the government for more than three decades.
A spokesman for Podemos said the results showed that two-party politics in Spain had ended.
“We are entering a new era in our country,” said Inigo Errejon.
The results gave Prime Minister Mariano Rajoy’s PP 122 seats in the lower house of parliament – well below the 176 seats it would need for a majority. It had 186 seats in the outgoing parliament.
The Socialists (PSOE) were predicted to win 91 seats, Podemos 69 and Ciudadanos (Citizens) 40.
Turnout was put at about 72% – up slightly compared to the 2011 election.
Analysts said the PP could find it very difficult to form a government because it can’t achieve a majority in parliament in coalition with Ciudadanos, its most natural partner.
The Socialists, on the other hand, could form a pact with Podemos and Ciudadanos.
Spain’s economy, corruption allegations and a separatist drive in the prosperous north-eastern region of Catalonia were all dominant issues in the election.
Mr Rajoy’s administration adopted tough austerity measures and job reforms that, although unpopular, have been credited with returning the Spanish economy to growth.
However, unemployment remains high at 21%, the second-highest rate in the EU after Greece, although it has fallen from its 2013 peak of 27%.
The PP has also been damaged by corruption scandals.