MADRID (Reuters) - An end to Spain's nine-month political deadlock is in sight after the Socialists' leader resigned but the party will have to patch over deep divisions and strike a deal before the end of October for the country to avoid a third election.
Pedro Sanchez quit on Saturday after a majority of party members voted to oust him at a chaotic assembly meeting in which a rift within Spain's main opposition party over how to resolve the country's impasse spilled over into anger and bitterness.
It marked the most dramatic turn in Spanish politics since a national election last December ended four decades of two-party rule and forced parties to negotiate over a government.
Sanchez had led a stand-off with acting Prime Minister Mariano Rajoy's conservative People's Party (PP), which won the most votes in December and in a repeat election in June but fell short of a majority in parliament.
With all other possible party combinations exhausted or lacking the numbers, Rajoy can only govern with the consent of the Socialist PSOE, which ruled Spain from 2004 to 2011 and holds 85 out of the 350 seats in parliament's lower house.
Frustration within the Socialists' ranks at Sanchez's intransigence prompted half its leadership to step down this week. A former Socialist leader accused Sanchez of lying about his intentions and the Spanish press hounded him to resign to "save the party".
But even without Sanchez, seen as the biggest stumbling block to a new government, the Socialists' interim management has just three weeks to decide whether to allow a conservative minority government under Rajoy or force Spain's third general election in a year.
"The Socialists have no risk-free political option," Vincenzo Scarpetta an analyst at the Open Europe think tank in London said.
Scarpetta cited Greece's long-established centre-left party PASOK as an example of what could happen to Spain's Socialists. In 2012 it joined a conservative-led government only to be subsequently wiped out by the rise to power of the far-left Syriza party.
NO RISK-FREE OPTION Facing another election could be just as disastrous when the party is in such disarray, say analysts, as it could hasten the Socialists' steady slip in the polls behind the PP which Sanchez presided over. He notched their worst-ever national election result in June.
Podemos, an anti-austerity party which emerged during Spain's deep recession and is now its third largest, has declared its intention to replace the Socialists as the country's main left-wing force. Its members have jumped on Sanchez's resignation as an opportunity to stake this claim. "In the PSOE those who support handing the government to the PP have won," Podemos's leader Pablo Iglesias wrote on Twitter after Sanchez's resignation. "Facing a corrupt government, we will continue with and for the people."
An abstention could also put the party's temporary leadership, whose members lean into the anti-Sanchez camp and will be in place until a party conference can appoint a new leader, at odds with its grassroots.
Polls this week showed a majority of ordinary members favoured Sanchez remaining as leader and several hundred rallied outside the Socialist headquarters on Saturday night to decry what they called a party coup.
"This is a conspiracy led by the right-wing," said Jose Luis Rodriguez, a 74-year-old retired doctor.
Politicians from the PP and Spain's fourth-largest party, centrist Ciudadanos said on Sunday there could be no more delays in forming a government, although they stopped short of calling for the Socialists to abstain.
Although Spain's economic recovery has weathered the political impasse so far, there are signs that further uncertainty could slow growth, hamper investment, and leave it increasingly adrift from its international partners.
Ciudadanos leader Albert Rivera said on Twitter that what was needed now was dialogue and chastised the Socialists for prioritising internal party politics over the country. Ciudadanos have backed both the PP and the Socialists in confidence votes over the past nine months, but in neither case was that enough to reach a majority.
"Spaniards do not have any more time and neither do they deserve more deadlock," Rivera said.
Editing by Julien Toyer and Catherine Evans