SOCIALIST leader Pedro Sánchez's first attempt to become president has failed with all bar his own and centre-liberals Ciudadanos' MPs voting in favour.
Left-wing independents Podemos, Compromís and United Left, along with all the pro-independence regional parties and the acting right-wing PP government voted 'no'.
This means out of 352 MPs, the PSOE head was way off the majority of 176 votes needed to get him into power.
Ciudadanos has 40 seats and the PSOE 90, but their combined 130 was no match for the PP's 123, Podemos' 65 and the combination of smaller outfits such as United Left with two, Compromís with four, Basque nationalist parties EH and PNV with two and six respectively, or Catalunya's pro-secession parties DiL and ERC with eight and nine.
Only the Canarian Coalition, with just one MP, abstained, but this did not help Sánchez much with 219 votes against him.
Sánchez's downfall appears to be the deal he struck with Ciudadanos, which immediately lost him the vital support of Spain's third-largest political power, Podemos.
The programme includes scrapping temporary job contracts and amalgamating the numerous types of these in circulation into just three – a permanent one, a 'training' one, and a 'stable' one with redundancy pay gradually rising according to the length of time the employee has worked for the company and becoming permanent after not more than three years.
They agreed there would be no funding cuts in social welfare, education or health, that income tax would not go up except for the very wealthy, and to scrap the provincial councils or Diputaciones, as well as the Senate, but to create a 'territorial senate' to become the voice of different towns and regions.
Universal healthcare would be guaranteed, as would the right to be cared for during sickness and old age, to all social security benefits, to housing, access to public information, and 'digital protection' – all via a change in the Constitution.
But although Sánchez insists the programme involves scrapping the PP's labour reform – which forced down wages and made it easier and cheaper to fire employees, leading to a low-paid, part-time and temporary-job culture which has done little to mop up unemployment figures and has led to in-work poverty and lack of job security – this is not mentioned anywhere on the final document.
And the minimum wage, currently €645 a month for a 40-hour week, will only be increased by €1.
Podemos wanted it to be raised to at least €1,000, and a guaranteed 'social benefit' of €600 a month for everyone who needed it.
On the plus side, a complete review of taxation and social security contributions for the self-employed was included in the programme, paying close attention to middle-of-the-road earners and not just those with a very low income.
Overall, however, Podemos, United Left and the other left-wing parties do not believe it includes enough measures to really make a difference to issues of poverty, the job crisis, and the impossibility of young adults accessing the housing market despite property being at its cheapest ever.
And political pride plays a hefty role: the left-wing believes the PSOE has 'sold itself' to Ciudadanos, a party they consider to be more far-right than the PP.
The PP itself, which credits itself for having avoided a European Union bail-out – despite having borrowed €10 billion from the EU to save ailing banks brought to their knees by poor management – and for having reduced unemployment from 25% to 21%, albeit through summer seasonal work, temporary contracts and over half paying less than the minimum wage, called the PSOE-Ciudadanos deal a 'farce'.
Acting president Mariano Rajoy says the programme 'seeks to undo all the good work' the PP has achieved in the last four years.
Podemos says Sánchez and the PSOE had been 'a very exciting prospect' in the beginning, but that he has now 'turned his back on the people of Spain'.
Sánchez's only hope now is to try again on Friday.
A second round of in-house voting is always on the cards for if the first round fails, although this has never yet happened.
In the second round, Sánchez will only need a simple majority – more 'yes' votes than 'no' votes, even if the 'yes' votes do not make up at least 176 out of the 352 – meaning he has just two days to persuade dissenters both on the right and left to either support him or abstain.
The key lies in successful negotiations with Podemos, but its leader Pablo Iglesias wants a series of concessions – to become deputy president and have several ministries under control of his own MPs, to agree to a referendum on independence in Catalunya, and a firm refusal to work with Ciudadanos.
Ciudadanos, on the other hand, says it will not negotiate any programme other than the one already decided, and refuses to work with Podemos.
In light of this unprecedented impasse, and should Sánchez fail to win Friday's vote, Spain will have two months to form a government.
If this does not work, the country will go back to the polls on June 26 – for the first time in the country's 41-year democratic history.