Spain's repeat election has failed to clarify the political future of the country, with the main parties placing roughly the same as in last December's ballot, which brought six months of stalemate.
With 97 percent of the votes officially counted on Sunday, the conservative Popular Party (PP) had won the most seats in the 350-member parliament.
The party won 137 seats, up from 123 in December, but short of the 176 needed to form a government on its won. Its earlier efforts to find support from rival parties proved fruitless.
The Interior Ministry said the centre-left Socialist Party was in second place with 85 seats.
Unidos Podemos (United We Can) - which brings together Podemos, a two-year-old party that grew out of a grassroots protest movement, and the communists and the Greens - was third with 71 seats.
The caretaker prime minister, Mariano Rajoy, said his PP had won the election and therefore claimed the right to govern.
Sunday's repeat vote came after the four main political parties failed to agree on a coalition after December's general election resulted in a hung parliament.
All eyes will now be on subsequent coalition negotiations, with political leaders under more pressure this time to form some sort of government.
Rajoy argued that since the PP came to power in 2011, it has brought Spain back to growth and overseen a drop in unemployment - though at 21 percent, it was still the second highest rate in the EU after Greece.
But his rivals retort that inequalities have risen and the jobs created are mainly unstable.
The PP has also been engulfed by corruption scandals in recent years, with jailed party treasurer Luis Barcenas telling investigators about a scheme of illegal contributions and donations to the party.
The Socialists were fighting smaller scandals of their own, involving allegations that former party members ran a fraud scheme by siphoning off public funds.