The governing Socialist Party in Spain looks set to win the most seats in the general election, but fall short of a majority with almost all results in.
With more than 85% of the votes counted, the opposition conservative Popular Party follows in second place, and the far-right Vox party appears to have heavily increased its vote share.
Right-wing parties have the most votes combined, though no majority.
Spain has not had a stable government since 2015.
This was the country fourth election in as many years.
Voter turnout at 18: 00 local time (17: 00 GMT) was 56 .8%, almost four points lower than at the last general election in April.
Spanish politics has become increasingly fragmented in recent years with the emergence of new parties.
What are the results so far?
Partial results show the Socialists (PSOE) winning 121 of the parliament’s 350 seats, while Vox had 53 seats, more than double the number the party had in the outgoing assembly.
The Popular Party (PP) is in second place with 86, up from 66 in the previous poll.
This would mean that both the PSOE and the PP could struggle to form a coalition government without involving smaller parties – as 176 seats are required for a majority.
Not a good a night for acting PM
Guy Hedgecoe, Madrid
Although Pedro Sánchez’s Socialists have emerged as winners having suffered only slight losses in this election, the overall result is not a positive one for the acting prime minister.
With Podemos having lost some ground and Más País securing only a handful of seats, there is no clear left-wing majority. The Socialists’ arch-rivals on the right, the PP, have recovered many of the seats they lost in April’s ballot.
If the country longstanding political stalemate is to be broken, Mr Sánchez might have to seek the support of the PP, or else a third election in the space of one year could beckon.
Meanwhile, the huge surge by the nationalist Vox party makes it the country’s third political force and it will now find it easier to set the agenda on the right. That is likely to hinder any attempts by Sánchez to seek a conciliatory solution to the Catalan crisis.
That election ended in deadlock and the two parties failed to form a coalition together by the September deadline which forced Sunday’s election.
To form a coalition now, they would need to form alliances with smaller, nationalist parties, analysts suggest.
Meanwhile, the PP and Vox could seek to make the most of their gains, if confirmed.
One PP politician said that Socialist Prime Minister Pedro Sánchez should “start to think about going”, given the early results.