Who wins the fight will determine the future of the party and of Spain itself, which has suffered through months of political paralysis and two inconclusive elections — and will hold a third ballot if no one can put together a coalition by the end of October.

On Wednesday evening, 17 of the 35 members of the party's executive commission resigned in a bid to remove Sánchez from power. The party's terrible electoral results and Sánchez's refusal to allow the conservative People’s Party, led by Mariano Rajoy, to form a minority government had left him increasingly isolated.

Sánchez on Thursday held talks with the remaining commission members and pressed ahead with plans for a party congress to let grassroots members choose the leader. Voting is scheduled for October 23, with the winner's official coronation planned for mid-November.

However, one of the rebels, Verónica Pérez, the president of the Federal Committee (the nearly 300-strong party governing body), said Sánchez and his loyalists no longer had any authority.

“In this moment, the only authority that exists in the PSOE is the president of the Federal Committee, who, like it or not, is me,” she said at the front door of the party headquarters.

Pérez waited for two hours in the hallway of the HQ on Thursday but Sánchez supporters refused to let her in.

In the evening, Andalusia's president Susana Díaz opposed Sánchez's schedule, saying that the party needs first to "give the country a government," and then think about its future direction. She didn't directly advocate letting Rajoy govern, but warned that all options are "bad options."

1. The odds are against Sánchez

The numbers in the pro- and anti-Sánchez camps are evenly split but, in terms of the power they wield, the leader's detractors are way out in front. The PSOE governs in seven Spanish regions, and only one of those local leaders backs Sánchez. One of the six who oppose him is the powerful Díaz, who, if Sánchez falls, is seen as a likely future leader.

Regional leaders from historically important areas for the party such as Catalonia and the Basque Country support Sánchez, but they aren't in power. Sánchez doesn't enjoy great support among party elders. Former Prime Minister Felipe González is an outspoken critic who has accused him of lying about facilitating Rajoy's investiture, although former prime ministerial candidate Josep Borrell and a few others have offered Sánchez their support. In terms of the grassroots party members, Sánchez’s willingness to call a vote indicates that he’s confident of having their support.

2. The Corbynite route

Sánchez’s most powerful opponents wanted him to allow Rajoy to remain in office and take the blame for keeping the center-right in power. Their plan was to kick out Sánchez and replace him with a new leader — probably Diaz — and have a fresh start in opposition to a weak Conservative government. Sánchez wasn't prepared to join in and has taken his lead from Jeremy Corbyn, leader of the U.K.'s opposition party: pitting the grassroots supporters against the party establishment. He also tried to frame the debate in a simple way: a fight between those who were prepared to facilitate Rajoy’s second mandate and those who were not.

Labour party leader Jeremy Corbyn addresses delegates and members during his keynote speech at the ACC on September 28, 2016 in Liverpool, England | Leon Neal/Getty Images

However, that doesn't take into account that Sánchez has led the party to its worst electoral performances in its history. That alone would, for many, be enough for a leadership change. And not all of Sánchez supporters are convinced that they should refuse a government by Rajoy at all costs – including a third ballot.

3. Ideological differences

Although there are no major ideological differences between the opposing factions, some key issues are pushing them apart. The most powerful opponents of Sánchez share a more unitarian, centralist vision of the country, whereas Sánchez allies are more inclined towards a federal, decentralized Spain.

The problem for Sánchez is that the centralist leaders are the only ones winning elections for the PSOE. The problem for the PSOE is that it has lost significant ground to the far-left Podemos, which favors self-determination, in independent-minded regions like Catalonia and the Basque Country, and it is unlikely to win them back with a centralist mindset.

That makes no easy choice for the party. And there's also a problem of credibility about a leftward push: Where Sánchez differs from Corbyn is the Labour leader is a lifelong leftist, whereas Sánchez — a 44-year-old economics professor who worked in a private university in Madrid — was chosen as leader precisely because he was seen as a moderate.

4. Rulebook riddles

The party's rules are so badly designed that the legal arguments put forward by both sides seem to be correct — but they want completely different outcomes. So divided is the party that almost no one is advocating compromise and negotiation. Whoever wins, the party will remain deeply divided and in no fit shape to face new elections or make one of the most difficult decisions in its history. On Saturday, the Federal Committee is expected to meet and try to decide on Sánchez's plan to hold a leadership vote this month.

5. Rajoy wins again

The acting prime minister's beloved "wait and see" approach is again paying dividends. With the PSOE in its worst shape in decades, whatever happens to his traditional rival will suit him. Another beneficiary of the PSOE’s disarray is Pablo Iglesias of Podemos, who can portray himself as the only truly leftist option in the country.

Iglesias, whose own party was deeply divided after its failure to overtake the PSOE in June's elections, has been given one more chance at beating the establishment and becoming the leading voice of the Left in Spain.

Related stories on these topics:

mark

one very important element in Spain: once you are in power, you NEVER go away. Dimisión – nunca! What would Sanchez do if be leaves? Life would be dull without a chauffeur driven car. Best image was during the summer: he was spotted several times on the beach ..