Image copyright Reuters Image caption Pedro Sanchez had refused to make a deal

The leader of Spain's opposition Socialists, Pedro Sanchez, has resigned, in a move that could end months of political deadlock.

Mr Sanchez stood down after losing a vote by the party's federal committee over supporting the formation of a conservative-led governing coalition - a move he had strongly opposed.

The past week had already seen almost half of the party's executive resign.

Spain has been in a political limbo for the past nine months.

The results of a general election in December 2015 left a hung parliament. The majority Popular Party (PP) under acting Prime Minister Mariano Rajoy has sought to form a coalition government but Mr Sanchez repeatedly blocked their attempts.

In attempt to break the stalemate, a second election was held on 26 June 2016 but, again, no party won an absolute majority.

The Socialist Party (PSOE) has long been divided between supporters of Mr Sanchez and those who want to end the stalemate by supporting a coalition.

Many delegates at Saturday's federal committee meeting at party headquarters in Madrid had turned up hoping to force Mr Sanchez out.

On Wednesday, 17 of the 35 members of the PSOE executive resigned in protest at Mr Sanchez's stance.</s>A caretaker executive has taken control of the Spanish Socialist Party, as it struggles to unite following a split which has led to the resignation of its leader, Pedro Sánchez.

Mr Sánchez stepped down on Saturday night after losing a vote by the party’s federal committee on his proposal to stage a snap leadership primary, followed by a national party convention.

After a week of open civil war in the party, Saturday’s vote in the Socialist headquarters in Madrid was expected to be key for the leader. The result – 132 votes against his proposal, 107 in favour – made Mr Sánchez’s position untenable but it also reflected the scale of the party’s division.

“I call on all true Socialists to be proud of being part of the Socialist Party, today more than ever,” Mr Sánchez (44), who became leader in the summer of 2014, said in his resignation speech. “That is how I say goodbye, sure of the fact that it has been an honour to be secretary general of the Socialist Party.”

Pressure had started to build on Mr Sánchez following disappointing results in December and June’s inconclusive general elections. When the party performed poorly again in regional elections in Galicia and the Basque country last weekend, he sought to wrong-foot his critics by calling the primary for later this month.

However, the resignation mid-week of half the Socialist executive in protest at his leadership unleashed an all-out conflict in the party.

Many in the party have also been unhappy at Mr Sánchez’s insistence on refusing to ease the investiture of conservative Mariano Rajoy as prime minister, in order to end a nine-month political impasse. Mr Sánchez had instead insisted on trying to form a leftist alternative government, although that had looked increasingly unlikely.

A 10-strong caretaker executive headed by Javier Fernández, premier of the Asturias region, is now leading the party, until it chooses a new leader.

Susana Díaz, the premier of Andalusia who has long been seen as a rival to Mr Sánchez, is a favourite to fill the post.

Mrs Díaz had been at the centre of Saturday’s tense and often unruly federal committee meeting, which took place as demonstrators from both sides clashed outside the party headquarters.

“I appeal to you to think of the spectacle – not just national, but international, spectacle – that we are making of ourselves,” she told her colleagues at one point.

The deadline for a new government to be formed looms at the end of October, when a third election in 12 months could be called if the political stalemate does not end. The Socialists’ caretaker executive must now decide whether to support Mr Rajoy in a new bid to form an administration – and risk angering traditional party supporters – or sit tight and compete in the new election.

Ximo Puig, the Socialist premier of the Valencia region and an outspoken Sánchez critic, said that “two [general elections] are enough and if that’s not the case, then probably all the parties should think about whether we should change candidate”.</s>Hopes for an end to Spain’s nine-month political deadlock have risen after the shattered Socialist Workers’ party deposed its leader over his pointblank refusal to allow the acting prime minister to form a government.

Pedro Sanchez, who had fought to retain the leadership of the PSOE since a coup against him erupted this week, stepped down after a long and bitter meeting of the party’s federal executive committee on Saturday.

His plan to hang on to his job by holding a leadership contest in three weeks’ time was eventually rejected by 132 votes to 107 at the end of an 11-hour session that laid bare the chaos and anger at the heart the PSOE.

Shortly afterwards, Mr Sanchez announced his resignation and the party was put in the hands of a caretaker leadership that will have to decide soon on its next step as a deadline looms for avoiding Spain’s third general election in just over a year.

Mr Sanchez had consistently argued that the party would not do anything to support or facilitate the return to government of Mariano Rajoy’s conservative People’s party, on the grounds that the PP had wrought too much damage on Spanish society and was hopelessly mired in corruption scandals.

It was a stance that infuriated not only many voters - and the media - but also his adversaries within the PSOE who blamed him for the party’s disastrous electoral performance.

“As I said yesterday and as I’m saying again today, my parents taught me that the most important thing is keeping your word,” Mr Sanchez said. “That was my word, which I gave to all the members and to the federal committee, too, when it came to the party’s position on Rajoy’s investiture process.”

On Wednesday, hours before half of the executive committee resigned to try to force Mr Sanchez out, the party’s former leader Felipe Gonzalez accused him of going back on an assurance that he would allow Mr Rajoy to form a minority government following a second inconclusive election in June.

Like many in the party, Mr Gonzalez urged Mr Sanchez to let Mr Rajoy govern. Susana Diaz, the leader of the PSOE in Andalusia and the candidate most frequently touted as Mr Sanchez’s successor, also insisted that the needs of the country had to come before the needs of the party.

The PSOE now has a month to regroup and re-evaluate its position before King Felipe could dissolve parliament and call new elections to be held at Christmas.

Although the removal of Mr Sanchez could help end the political paralysis, his departure is likely to prove a pyrrhic victory for Ms Diaz and her supporters. The civil war that has torn the socialists apart will only serve to strengthen Mr Rajoy’s hand and boost the appeal of Podemos, the anti-austerity party that has long dreamed of replacing the PSOE as the strongest voice of the Spanish left.

Pablo Simon, a political science professor at Madrid’s Carlos III University, said the PSOE had been left “mortally wounded” by the week’s events and in no mood for third elections in which they would suffer even further.

“The Socialist party is so weakened, so destroyed and so ripped apart that all it can do is limp on,” he said. “If it’s going to negotiate, it can only do so with its hands up.”

Reports suggest the PP will ask the socialists for far more than just a smooth investiture. Safe in the knowledge that he could use fresh elections to crush his party’s longstanding rivals, Mr Rajoy is likely to extract the maximum possible gains from any deal.

“His conditions are going to be very harsh,” said Mr Simon. “It seems he’s going to look for their support to make sure he has four easy years in office.”

He predicted those who had helped oust Mr Sanchez were unlikely to find their efforts rewarded. “There’s a whole generation of socialist leaders who have damaged themselves with this move: Susana Diaz, Guillermo Fernandez Vara [the PSOE president of Extremadura] and Eduardo Madina [a former leadership candidate] are all divisive figures within the party now,” he said.

“Whoever leads the party into the next phase needs to be someone completely new and unstained by the conspiracy.”

Mr Simon said Mr Sanchez’s replacement faced an almost insurmountable task. “The wound the PSOE has sustained is going to be very hard to cure and will need many electoral cycles to heal. I get the feeling that we’re heading for a long cycle of government by the right in Spain. ”</s>Long-time socialist voter Francisco Gómez chained himself to the railings outside his party’s local headquarters in the city of Mérida, in western Spain this week.

He was protesting about the rebellion against his party’s leader, Pedro Sánchez. A few hours earlier, 17 members of the socialist executive had resigned in a bid to unseat the leader, and as Sánchez and another 17 loyalists stood firm, an all-out, very public, war had been unleashed in the heart of the party.

“They’ve been pulling the rug from under Pedro Sánchez for ages,” Gómez said, warning that he and other grassroots members of the party would not let it be turned into a “brothel”.

Gómez’s direct action reflects the scale of the drama within the Spanish Socialist Workers’ Party (PSOE). Founded in 1879, it has a long and illustrious history and has governed for 21 of the last 34 years. But the party’s current woes represent its biggest crisis since the transition to democracy of the late 1970s and early 1980s.

“During the Spanish transition there was a common saying, which still applies today,” Juan Francisco Fuentes , a historian of the Socialist party, told The Irish Times. “There are three kinds of enemies: enemies, arch enemies and party colleagues.” The PSOE is currently taking political self-destruction to unbelievable extremes.”

This crisis was triggered by the results of two regional elections last Sunday. The socialists lost ground in both, slipping to third place in Galicia and fourth in the Basque Country.

It was the latest in a series of electoral disasters for the party, following a worst-ever result in the inconclusive December 2015 general election, and an even poorer one in the June rerun. Sánchez responded to complaints about the weekend’s performance and his leadership by calling a snap leadership election for later this month, hoping his enemies in the party would not have time to prepare a rival candidacy.

But on Wednesday, Felipe González, a former Socialist prime minister, publicly accused Sánchez of “betraying” him by not abstaining in a congressional investiture vote earlier this month, despite allegedly promising that he would.

The abstention would have allowed conservative Mariano Rajoy to end a nine-month political stalemate in Spain and form a new government. However, it would also have run the risk of alienating traditional socialist voters. Soon afterwards, Sánchez’s rivals broke cover, as the 17 rebels resigned, calling on him to do the same. Sánchez and his team refused, even locking Antonio Pradas, until a few hours earlier the party’s national policy chief, out of the socialist headquarters in Madrid.

In a fierce editorial, El País newspaper, traditionally a supporter of the Socialist party, described Sánchez as “an unscrupulous fool” whose personal ambitions have been holding the country to ransom.

Comparisons have been made with Labour’s split in the UK over Jeremy Corbyn’s leadership, especially in light of Sánchez’s own tendency to appeal to grassroots supporters for backing. But ideology has barely figured in the Spanish socialists’ current hostilities. Instead, this is a conflict born of personal clashes and confusion generated by a new electoral landscape.

The powerful regional premier of Andalucía, Susana Díaz, is widely seen as being behind the putsch. Her ambition and thinly veiled disdain for Sánchez’s leadership have undermined him ever since he emerged as a relative unknown to take the party’s reins in the summer of 2014.

But Sánchez has also had to contend with the arrival, in that same year, of Podemos as a major rival on the left. Under the leadership of Pablo Iglesias and, buoyed by its status as a relatively untainted new force, Podemos has inevitably hurt the socialists.

Sánchez made his own attempt at forming a government in March, with the support of the liberal Ciudadanos, but fell well short of the votes needed in Congress.

Since then, he has refused to help Rajoy do the same, while insisting he can still reach out and form a leftist alternative. The party is split over this plan and over whether to help Rajoy by abstaining in a future vote, or to sit tight until a December general election and risk losing even more ground.

The party’s economic chief, Manuel de la Rocha , is one of the members of the executive who have remained loyal to Sánchez.

“His position is firm that the socialist party should never facilitate a PP government,” he told The Irish Times following a meeting of loyalists on Thursday.

As for the prospect of forming a leftist government with Podemos and other parties, De la Rocha admitted it was “always difficult and now looks even harder”.

However, the most immediate challenge for Sánchez, the man many blame for Spain’s unprecedented political impasse, is to survive an emergency meeting of the party’s federal committee today.</s>‘Can someone in Spain explain to me exactly what’s going on with PSOE?” wrote Guardian columnist Owen Jones last Wednesday on his Twitter feed.

His bafflement is understandable. It is as if hell has broken loose in the 137-year-old Spanish socialist party, which is bitterly divided in ways that recall the current schism in British Labour.

Half the organisation no longer recognises secretary general Pedro Sánchez as its leader and considers him ousted by the executive committee. But fuzzy party rules leave this open to interpretation. So Sánchez, with the support of the other half of the PSOE, has been barricading himself – quite literally, until this week − inside the party’s headquarters in Madrid. Outside the building a plaque recalls that it was in this very house where the founder of the Spanish socialist workers’ party, Pablo Iglesias Posse, passed away.

Considering the stakes, the immediate cause of this bitter argument seems a trifle: a mere difference of opinion on a matter of strategy. But it’s one that touches the core of the party’s identity. Spain has been in a deadlock for nine months now. After two indecisive elections it has been impossible to form a government, and a new vote looms in December.

The socialists have been doing badly in all previous polls, and Sánchez’s critics think it would be better to avoid a new defeat – even if that means abstaining in parliament to allow the formation of a minority conservative government, and preventing the election from going ahead.

On the other hand, Sánchez and his followers believe the socialists have a duty to oppose the right, regardless of the cost. They are even ready to form a difficult leftist coalition with the party Podemos and, more controversially, with the support of the Catalan pro-independence parties who are opposed by some socialists as strongly as they are by conservatives.

Deep down, here are two ways of understanding the role of the socialist party in Spain. One view is of the PSOE as a player in a two-party system with the conservative People’s party (PP). The socialists haven’t won this time, so they think it’s fair to let their rivals govern until their own turn comes. These are the rules to which all supporters of two-party systems, including most of the British Labour and Conservative parties, subscribe. Sánchez, though, believes we have entered a new political landscape, one in which new forces in the centre (Ciudadanos party) and the left (Podemos) have broken the old consensus – much as some are arguing that the two-party system is broken in the UK.

In the case of Spain, both arguments have their flaws. Sánchez is right in his diagnosis of a new political landscape, but it is one that affects mostly the socialists. The PP remains relatively strong in spite of an endless series of corruption scandals, and is regaining support.

Sánchez is also, perhaps, too optimistic about the flexibility of his electorate. While he can count on most of the membership to support him in forging an alliance with Podemos, socialist voters are typically more moderate than members, and many of them would abstain or switch sides if Sánchez accepted the support of the Catalan nationalists.

There’s also a more superficial aspect to this quarrel. Those who oppose Sánchez are mostly nostalgic party grandees plus regional office-holders more interested in ending Spain’s political stalemate than in how it is ended.

As for Sánchez, his newly acquired leftist persona is unconvincing. When he won his leadership contest two years ago he was the establishment candidate, handpicked by the same party heavyweights who now want him out. Personal ambition is not unknown in politics, but Sánchez’s is so conspicuous that it weakens his case.

Two things could happen now, and neither looks good for the socialists. Sánchez may survive the coup, but the leftist coalition that could have made him PM is definitely off the table. Now it’s obvious that he can’t count on the support of his own parliamentary party. But if he’s ousted the critics may not get what they want either. They would be free at last to help the conservatives into government and thus avoid a new election, but after all that’s already happened this could destroy their party. And as things stand, the conservatives have every incentive to call new elections. It could yield them an absolute majority, or close to it.

Many expect the conflict to benefit Podemos, which has been in a downward spiral. This is possible. The PSOE has already lost many votes to them and could give up a few more if Sánchez is fired. But this is unlikely to offset the gains of the conservatives, and a coalition with the PSOE would then be out of the question. A lot was expected from the “new political landscape” in Spain. As it turns out, new factors don’t necessarily mean different outcomes.
The leader of the Spanish Socialist Workers' Party, Pedro Sánchez, resigns.