[MADRID] After nine months, two elections and a dramatic revolt in the 137-year-old Socialist party, the machinery of Spanish politics broke free of its gridlock this weekend in a pivotal shift that may finally allow Mariano Rajoy to take office for a second term.
Socialist leader Pedro Sanchez, the main obstacle to the caretaker prime minister's ambitions, resigned late on Saturday, pushed out after more than 10 hours of tempestuous talks in Madrid by rebels demanding he drop his opposition to Mr Rajoy's People's Party.
With 85 lawmakers in the 350-strong parliament, the second biggest delegation, Mr Sanchez had wielded an effective veto over Mr Rajoy's efforts, even though he was unable to deliver on his own plans for an anti-PP coalition.
The caretaker administration appointed to replace Mr Sanchez will meet for the first time on Monday at 12 noon in Madrid. On its to-do list will be planning a new leadership election and working out how to handle the humiliating business of putting its traditional rival into power.
Mr Rajoy came within a handful of ballots of winning a confidence vote last month, with the support of the pro-market liberals of Ciudadanos, and needs to win parliament's backing before the end of October or a third election will be triggered.
"The Socialists can't afford to go to new elections because they would be pressing the self-destruction button," Antonio Barroso, a political analyst at Teneo Intelligence in London, said in a telephone interview. "They have lost negotiating power and Rajoy can take advantage."
The showdown on Saturday between the Sanchez loyalists and the rebel faction on the party's federal committee was delayed first by arguments about the agenda for the meeting, how the poll would take place and even who could vote.
At one point, the leader's supporters set up a ballot box and started collecting ballot papers before the rebels intervened, insisting it had to be a show of hands.
Once it got started, the proceedings were relayed live via social media, a spectacle that was greeted with dismay by many party veterans and anger by crowds of Sanchez supporters gathered on the pavement outside party headquarters chanting and waving placards in defense of their leader and booing anyone who entered the meeting.
Mr Sanchez's call for an emergency leadership election to ratify his opposition to Mr Rajoy was ultimately rejected by 133 votes to 107, leaving him little choice but to step down.
Mr Sanchez had been trying to rally support for an anti-Rajoy alliance since the acting prime minister lost his majority in December's general election. Socialist lawmakers voted against the caretaker prime minister's candidacy in two confidence votes in August and September, but the party failed to bridge the ideological differences between anti-establishment group Podemos and the liberals of Ciudadanos, his most obvious allies.
The group's interim leadership will have to negotiate the terms of its support with Rajoy. The acting prime minister can then inform King Felipe that he has the backing required to win a confidence vote, allowing the head of state to propose another ballot. That process should take about two weeks once the Socialists make their stance clear.
Mr Sanchez's position was fatally weakened on Sept 25 when his party suffered losses in two regional elections in northern Spain, slipping behind two-year-old Podemos in both Galicia and the Basque Country.
Those defeats encouraged party rebels to make their move, and they were given further ammunition on Wednesday when former Socialist Prime Minister Felipe Gonzalez accused Mr Sanchez of lying to him over his political strategy. By the end of the day, a rebel bloc had resigned en masse from the party's executive committee and critics were claiming that Mr Sanchez no longer had the authority to lead the party.
The two years that Mr Sanchez led the Socialist Party were marked by the emergence of Podemos, which burst onto the scene in 2014 giving voice to the millions of voters enraged by the economic crisis and a wave of corruption among the traditional parties.
As he struggled to fend off the party's first serious challenge on the left for a generation, while also trying to articulate an economic program to challenge Mr Rajoy, Mr Sanchez led the Socialists to their worst ever election results in two consecutive elections.
"It's hard to assess the full consequences for Spain of such a crisis in the Socialist Party," said David Pac Salas, a sociology professor at the University of Zaragoza.
"It's not too much to say that the Socialists risk the same fate as Pasok," now a marginal force in Greece after leading the country into the financial crisis, just like their Socialist counterparts in Spain.