Talks between Pedro Sanchez's Socialists and Podemos have proved difficult and tensions between the two parties have reached a new high, with both camps suggesting talks were all but dead amid mutual reproach.
Spain's acting prime minister Pedro Sanchez has mere hours to secure a coalition deal with far-left Unidas Podemos and win support from smaller parties if he is to be confirmed in a vote on Thursday and avoid the risk of a repeat election.
Talks between Sanchez's Socialists and Podemos have proved difficult and tensions between the two parties reached a new high on Wednesday evening as both camps suggested talks were all but dead amid mutual recriminations.
Sanchez, who won the most seats in an April parliamentary election but fell short of a majority, needs the support of Podemos, as well as the abstention of at least one other smaller party to reach the simple majority required to be confirmed as premier in Thursday's vote in parliament.
The negotiations remain stuck on the question of what role Podemos would play in a possible coalition government, which would be Spain's first in the modern era.
If Sanchez loses the vote, Spain could face its fourth election in as many years as the country struggles to adjust to an increasingly fragmented and polarised political landscape - unless he makes fresh attempts to be backed by parliament in September.
The debate will begin at 1:30 pm local time (1130 GMT) with voting expected to take place at around 2:25 pm local time, and much can still change before then.
Sanchez lost a first confirmation vote on Tuesday by 170 votes to 124, with 52 abstentions, after Podemos abstained and several regional separatist parties voted against him.
If defeated, Sanchez, who has little support among other parties, could be forced to call a repeat election.
Formed in 2014, anti-austerity Podemos previously backed Sanchez to rule in minority after the Socialist leader came to power when the previous centre-right government was ousted last year.
They now seek to enter into government.
Podemos wants responsibilities on social policy, likely including rent caps, an increase of the minimum wage and an increase in social spending across the board.
Podemos may also seek to challenge key reforms of the pension system and labour market enacted under the former conservative government.
The Socialists and Podemos are close on political issues but differ on the question of Catalonia's independence ambitions, which in 2017 provoked a major constitutional crisis.
Podemos has previously backed Catalonia holding a vote on its future relationship with Spain, something Sanchez rules out.
Three months of frequently acrimonious talks between the two parties suggest that any coalition government could be vulnerable to similar division.