The results come days after the U.K.’s EU referendum, which saw Britons vote to end their country’s 43-year membership to the bloc.

With more than 99 percent of votes counted, Popular Party has won more seats than it did in the inconclusive December, 2015 elections, but the deadlock remains.

”Friends, we’ve won the elections and we will claim the right to govern because we’ve won the elections,” a jubilant Rajoy told a cheering crowd.

“Starting tomorrow we are going to talk to whoever we must to defend Spain.”

Perhaps not unexpectedly, the main opposition leader shut the door early. Pedro Sanchez of the Socialist Party, which has held on its second-place position with 85 seats despite losing five in the process, said he would not be supporting Rajoy and intends to lead a “progressive” government. 

“The Socialists have reaffirmed our position as the hegemonic party of Spain’s left,” Sanchez said.

Meanwhile, a big surge in Spain’s far-left party United Podemos, predicted in exit polls and pre-election surveys, failed to materialize, results show.

The party saw zero change since December’s elections, staying at 71 seats, even though they were widely forecast as the new main opposition.

“The results have surprised us all, given the expectations,” a somber Pablo Iglesias, the pony-tailed leader of Podemos told the media late Sunday night.

Rajoy’s conservative Popular Party is up 14 seats compared to December’s election and will hold 137 in the new parliament -- still far from the 176 needed to govern.

The ruling party took many of their seats from the centrist Ciudadanos Party, which branded itself as an anti-corruption alternative. Ciudadanos won 32 seats, eight less compared to last year.

Many analysts point to the shock of Thursday's 'Brexit' vote as a likely cause of voter’s unpredicted shift away from change and towards familiarity. 

Pacts will again be necessary to form a government and avoid a third election. Although the traditional parties had unexpectedly positive results, the 350-seat Spanish Parliament remains highly fragmented.

Also in contrast to general expectations that voter participation would drop in Sunday’s repeat elections, the turnout was higher at 69.8 percent on Sunday, Spain’s Interior Ministry reported, compared to 69.7 percent last December.​

Anadolu Agency