Spain's acting prime minister has failed to secure enough votes in parliament to form a new government, bringing the country closer to a potential third election in a year.

Mariano Rajoy, the leader of the conservative Popular Party (PP), lost Wednesday's vote of confidence after receiving 170 of the 176 votes needed for an absolute majority in the 350-member body.

He was backed only by his own party, the centrist Ciudadanos and a lone MP from the Canary Islands.

Spaniards voted for the second time within a six-month span at the end of June, after the four main political parties failed to agree on a coalition when December's general election resulted in a hung parliament.

The PP, in power since 2011, won the most seats in December and June's elections but fell short of an absolute majority both times as voters angry over corruption and austerity supported new formations.

READ MORE: Tension and suspense as polls open in Spain elections

Another confidence vote will be held on Friday, in which Rajoy will only need more votes in favour than against.

The Socialists, who came second in the polls, have steadfastly refused to back Rajoy, with leader Pedro Sanchez telling the assembly that the acting prime minister had "no credibility".



If there is no breakthrough, voters will be asked to return to the polls on December 25, the date determined by timings laid out in Spanish election law.



Socialists and other parties have already proposed shortening the campaign so a repeat election can be held on December 18.