Spain's governing conservative party has won the most seats in the general election, but fallen short of a majority.
The Popular Party (PP) was on 28.7 percent when almost all the votes were counted, with the Socialists on 22 percent and anti-austerity Podemos on 20.6 percent, BBC reports.
The liberal Ciudadanos party had 13.8 percent of the vote.
The PP and the Socialists have alternated between themselves in running Spain's government for more than three decades, but this year's elections have disrupted this.
The results give Prime Minister Mariano Rajoy's PP 123 seats in the lower house of parliament. It would need 176 seats to be a majority. The Socialists had 90 and the Podemos party had 69.
Analysts predict it will be difficult for the PP to form a government because it cannot create a majority with Ciudadanos, its natural partner according to the BBC.
The Socialists however, could join with Podemos and Ciudadanos.
Mr Rajoy's job reforms proved unpopular, but are expected to rebuild the Spanish economy.
Unemployment remains at 21 percent, the second-highest rate in the EU after Greece, although it has decreased since 2013, when it was at its highest of 27 percent.
The PP has also been damaged by corruption allegations.