Just when it seemed Spanish politics was getting boring, its main opposition party implodes. PSOE, the 137 year old social democratic party, has descended into internal warfare and political analysts are now reassessing the possibilities for future government formation.

@OwenJones84 I will write you 😉 — Pablo Iglesias (@Pablo_Iglesias_) September 28, 2016

As Novara Media has reported, Spain’s traditional two-party system broke up into four in last December’s elections, delivering a stalemate that found no resolution in the June re-elections. Many see the deadlock of 2016 as evidence that the post-Franco consensus is indeed crumbling – an edifice which began to crack in May 2011 with the outbreak of the Indignados movement. As a new world struggles to be born, the old world is certainly dying. The meltdown of PSOE is its death throe.

1. The stalemate.

The December elections delivered an unprecedented scenario in Spanish politics: in the new four party system, only a three-way pact can ensure the formation of a government. The question of who to strike deals with gives rise to a long-delayed existential dilemma for PSOE, a party that has made its ideological stances increasingly ambiguous in its journey to the centre of the political spectrum. Three options are on the table:

A Partido Popular (PP) minority government facilitated by Ciudadanos and PSOE. This is the option preferred by the right-wing parties, business elites, and even PSOE’s own old guard. However, supporting PSOE’s traditional nemesis presents risks that many social democrats are unwilling to take.

A PSOE and Podemos government coalition facilitated by left-wing Catalan nationalist forces. This option would require a binding self-determination referendum for Catalonia – an option vetoed by PSOE’s more right-leaning factions.

A PSOE government facilitated by left-wingers Podemos and right-wing liberals Ciudadanos. This option would be the least uncomfortable for PSOE, and is what its current leadership – headed by Pedro Sánchez – is holding onto. However, the ideological stances of Podemos and Ciudadanos are fundamentally antagonistic and each party has explicitly ruled out working with the other.

This impasse persisted throughout the summer and it seemed the Spanish political landscape was sliding quietly into yet another set of elections. But on Sunday 25 September, the regional elections that took place in Galicia and Euskadi (the Basque Country) delivered disastrous results for PSOE. Things got shaken up.

2. The detonator.

Spain is a state formed of 17 devolved regional governments, which means regional elections always have a major impact on country-wide politics.

In the Basque parliament, PSOE plummeted down to nine seats (from 16 in 2012 and 25 in 2009) and was outstripped by Podemos (11 seats). Once not long ago, Euskadi used to be a stronghold of PSOE that symbolised its ability to integrate Spain across its many strong regional identities. With Catalonia already lost – where PSOE faced a debacle similar to that of Labour in Scotland – the party is losing its grip on sections of its formerly diverse voter base and faces the dangerous prospect of only appealing to an increasingly rural, aged and southern electorate.

As regional identities become radicalised, the integration role is being supplanted by Podemos and its promises of self-determination.

Galicia also possesses a distinct identity, but here the strength of separatist forces is far from the might of the Catalan parties. Still, Podemos achieved a good result, tying with PSOE in seats and outdoing the social democrats in the popular vote (the feared ‘sorpasso’). However, Galicia is also a conservative stronghold – the birthplace of prominent Spanish right-wingers from Mariano Rajoy (the current prime minister) to General Franco. Even so, PP’s third consecutive landslide in the region has unsettled many in Spain.

Sánchez was expected to resign, giving way to someone deemed better suited by PSOE’s more right-wing factions. Instead, he decided to call a leadership election and a party congress. His expectations, perhaps inspired by Jeremy Corbyn’s recent epic, are to hold onto the seat of power with the help of the party membership. His promise to them: to resist the onslaught of right-wing elites and to prevent a PP government at all costs.

3. The coup.

PSOE’s old guard and right-wing factions found this unacceptable, so they immediately launched the coup they probably had ready for months. The revolt is headed by Susana Díaz, the warden of the south and well-known claimant to PSOE’s throne. The idea was to quickly purge Sánchez, install an interim leader as a puppet, let PP have the government, and then – perhaps next year – have a congress to crown a new leader, probably Díaz herself.

On Wednesday evening, following the public denunciation of Sánchez by many high ranking party members, half of PSOE’s executive committee resigned – which according to party regulations automatically ousts an extant leader. However, there is just enough ambiguity in the clause to keep things interesting. Sánchez’s entourage argues the rebels have achieved the resignation of half the sitting members but have not factored in the three empty seats in the committee (two resigned on corruption charges and one passed away), which would mean they technically lack the numbers to force Sánchez out.

In short, the legal grey area means PSOE now has two competing leaders. According to the rebels, the highest authority in PSOE is their newly appointed head of the executive committee, Verónica Pérez – who just happens to be Díaz’s right hand in Andalucía. Of course, this didn’t prevent Sánchez’s forces from denying her access to PSOE’s headquarters on Thursday morning, to the bewilderment of the army of journalists that surrounded her. In the meantime, Sánchez threatened to take the issue to court from his office-turned-fortress.

The federal committee, PSOE’s ‘parliament’ (so to speak), is gathering on Saturday 1 October. The meeting, planned before the coup, will assemble a party with two leaders who deem each other as illegitimate. Some of Sánchez’s supporters are calling for protests at the gates. Things are so tense that some commentators are suggesting it might get physical.

4. In the meantime.

PP, a party notorious for its authoritarian iron discipline, is both shocked and bemused at the spectacle. Podemos is offering its support to Sánchez, aware that his replacement would destroy their chances of seizing power. In an attempt to destabilise the rebels, Podemos has joined the war by withdrawing its support of two PSOE regional governments headed by some of Sánchez’s most vocal rivals (Castilla-La Mancha and Extremadura).

PSOE’s rank and file members seem to be splitting across a left-right divide, the left backing Sánchez. However, Sánchez is no Corbyn; his struggle is not ideologically driven and must be understood as being a personal quest for power. When he was elected leader in 2014, he was seen as the most right-wing contender. It is also noteworthy that in the past Sánchez has snubbed internal democracy whenever it has suited him, and thus it remains unclear whether his rhetoric will be able to gather him enough support from the membership.