Mariano Rajoy faced his last hours as Spanish prime minister Friday as he braced to lose a no-confidence vote and make way for his arch-rival Pedro Sanchez, leader of the opposition.
Bar any last-minute u-turn, an absolute majority of lawmakers as varied as Catalan separatists and Basque nationalists will vote the no-confidence motion filed last week by the Socialists over a string of corruption woes hitting Rajoy's conservative Popular Party (PP).
"Your isolation, Mr. Rajoy, is the epitaph of a political period, yours, which is over," Sanchez, a 46-year-old former economics professor, told parliament on Thursday during an intense day of sometimes acrimonious debate.
"Today we're finally sending the Popular Party home," Pablo Iglesias, leader of far-left anti-establishment party Podemos, added.
In order to secure the success of the no-confidence motion, the Socialists, who hold just 84 of the parliament's 350 seats, have had to cosy up to parties as varied as Catalan separatist groupings or Podemos.
Sanchez has pledged to call a fresh election if the motion succeeds but only after governing long enough to restore "institutional stability".
Still, his new government will likely be unstable given the sharp divisions between those who support his motion.
"The room for big economic policy shifts will be very limited, and early elections within 12 months are the most likely outcome," said Antonio Barroso, deputy research director at Teneo Intelligence.
Rajoy, meanwhile, will become the first Spanish premier to lose a no-confidence vote since the country transitioned to democracy after the death of dictator Francisco Franco in 1975.
There have been three other such votes since, including one against Rajoy last year.
The vote will put paid to the 63-year-old's rollercoaster time as prime minister that saw him come to power in 2011 and implement drastic spending cuts before winning elections again in 2015 and 2016, though without the absolute majority he had in his first term.
He put Spain back onto the path of growth after a devastating economic crisis although unemployment remains sky-high, jobs precarious and many complain inequalities have risen.
Aside from that, his term in office was also marred by a series of corruption scandals involving former members of PP.
That prompted the no-confidence motion, which was filed last week after a court said it had uncovered a vast system of bribes given to former PP officials in exchange for lucrative public contracts between 1999 and 2005.
The National Court, which deals with major criminal cases, sentenced 29 people with links to the PP, including a former treasurer, to jail.
It also ordered the party to pay back 245,000 euros ($290,000) received from the scheme to help finance election campaigns.
Rajoy became Spain's first sitting prime minister to give evidence in a trial when he was called as a witness last year.
In its ruling, the court said the credibility of Rajoy's testimony "should be questioned".
During Thursday's debate, Rajoy said the corruption case "does not concern members of the government" and repeated the PP's argument that only a tiny number of its politicians have been tainted by corruption.
"The PP has had corrupt people, I acknowledge it but the PP is not a corrupt party," he said, before accusing Sanchez of "opportunism at the service of personal ambition".
Rajoy also hit back by listing the many graft cases involving the Socialists over the years.
"Are you Mother Teresa of Calcutta? With what moral authority do you speak?" he asked Sanchez.