Spain's conservative leader Mariano Rajoy was on course to secure a second term in power for his People's Party (PP) on Sunday after his Socialist rivals agreed to abstain in a looming confidence vote, ending 10 months of political deadlock.
Spain has been stuck in political limbo following national elections in December and June which left no single party with a majority, paralysing institutions and threatening to derail an economic recovery.
With a third ballot on the cards the centre-left Socialists, traditional opponents of the PP, ceded ground on Sunday in an extraordinary, internal party meeting to choose between a third general election or allowing Rajoy to govern.
Senior party members voted by 139 to 96 in favour of abstaining in a parliamentary confidence vote to be held this week.
Rajoy's minority government will have to contend with a hostile, deeply fragmented parliament over the next four years, opening up a fresh source of political instability for Spain.
His prime task will be to keep on track an economic rebound after years of recession, while cutting costs to meet stringent deficit targets.
December's election broke the stable two-party system that has ruled Spain since the death of dictator Francisco Franco in the 1970s, and a re-run in June delivered a similar result as new parties grabbed millions of votes in the wake of a deep recession.
Rajoy's PP beat the Socialists in both elections, followed by the upstart Podemos ("We Can") and Ciudadanos ("Ciudadanos") parties, which together secured close to a third of parliamentary seats.
To govern, Rajoy needed sufficient support or an abstention by his rivals in a confidence vote. That two-stage ballot will now take place this week, with the second vote due on Saturday or Sunday.