Spanish Prime Minister Mariano Rajoy was kicked out of office today in a no-confidence vote, paving the way for Socialist leader Pedro Sanchez to take power.
Photogenic Sanchez, 46, is known as 'Mr Handsome' in Spain and is a close ally of British Labour leader Jeremy Corbyn.
The vote was called after a corruption scandal rocked Spain when Rajoy's centre-right party was exposed for taking bribes in exchange for lucrative public contracts.
Photogenic Sanchez (left), 46, is known as 'Mr Handsome' in Spain, looks like Antonio Banderas (right) and is a close ally of British Labour leader Jeremy Corbyn
Twenty-nine officials have already been jailed for taking bribes from businessman Francisco Correa - with one of the party's former treasurers jailed for 33 years over the affair, known as the Gurtel case.
Rajoy, said it had been 'an honour' to serve the country in a speech to Parliament on Friday morning, moments before the vote of no-confidence was passed.
He told MPs on Friday: 'It has been a honor to leave Spain better than I found it. Thank you to all Spaniards and good luck.'
The landmark vote makes Rajoy 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.
Scroll down for video
Spain's new Prime Minister Pedro Sanchez (left) shaking hands with the former premier Mariano Rajoy on Friday
New Spanish Prime Minister Pedro Sanchez pictured with current Labour leader Jeremy Corbyn (right)
Pedro Sanchez poses for a phalanx of photographers in the Lower House of the Spanish parliament
Rajoy embraces a fellow conservative politician after the result of the vote which ousted him from power
Sanchez, a 46-year-old former economics professor, will now immediately become Prime Minister in his place under a Spanish law that prevents a power vacuum.
He has pledged to call fresh elections within months.
With news of the vote, Spain looks set to become the second southern European nation to fall victim to a political crisis amid Italy's repeated failures to form a government.
Sanchez, leader of the Socialist opposition, called the vote after Rajoy's conservative party was caught taking kickbacks in return for awarding public contracts.
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 (£215,000) received from the scheme to help finance election campaigns.
Outgoing Prime Minister Rajoy waves to assembled crowds as he leaves parliament for the last time as top dog
Mariano Rajoy (left) shakes hands with the leader of Spanish Workers' Socialist Party (PSOE) Pedro Sanchez
Rajoy addresses MPs in a speech to Parliament on Friday in which he declared he had lost the vote
Sanchez shakes hands with Prime Minister Rajoy after the vote and applauds towards clapping MPs
Pedro Sanchez walks through the chamber crowded by international media after the announcement of the result
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 Mr Rajoy's testimony 'should be questioned'.
Sanchez demanded Rajoy step down last week, arguing he had lost credibility after the court case.
'Resign, Mr Rajoy, your time is up,' Sanchez said during the debate in parliament.
'Staying on as prime minister is harmful and is a burden not only for Spain but also for your party.'
The Socialists hold 84 out of 350 seats in parliament and were able to win the vote with the backing of anti-establishment party Podemos, which had 67 seats.
They also managed to garner support from several small regional parties, including Catalonia's separatists and Basques, securing a total of 180 votes.
A group of Socialist MPs applaud Sanchez after the announcement of the results on Friday
Iglesias' party had backed Sanchez with the vote of no-confidence and the pair embraced after the announcement
Mariano Rajoy waves goodbye to his fellow party members after delivering his historic speech
A throng of MPs gave Rajoy a standing ovation before his emotive speech within Spanish Parliament
Rajoy had earlier tried to head off the rebellion against his party, admitting that there had been corrupt people in his party but arguing that the party itself is not corrupt.
He also painted Sanchez as an opportunist trying to game his way into power.
'Everybody knows that Pedro Sanchez is never going to win the elections and this is the reason for his motion, his urgency,' Rajoy said, reminding lawmakers that the Socialists have lost two elections under Sanchez.
He also played on fears that a Socialist government would bad for the economy, telling Sanchez: 'Every time you open your mouth, the risk premium goes up.'
Rajoy has been in power since December 2011 and has steered Spain out of its worst economic crisis in decades.
But his opponents complained that the recovery has come at the expense of austerity measures, high unemployment and rising inequality.
The Lower House of Spanish Parliament was completely packed out on Friday morning as Rajoy arrived to deliver his address
Mr Sanchez arriving at Spanish parliament ahead of the debates surrounding the controversial vote on Friday
Spanish Socialist Party leader Pedro Sanchez called the vote amid a corruption scandal engulfing Rajoy's party, and reportedly secured enough votes to win on Thursday
With most Spanish parties and Sanchez himself being pro-European, investors however see less broader political risk there than in Italy.
Anti-establishment parties in Rome revived coalition plans on Thursday, ending three months of turmoil by announcing a government that promises to increase spending, challenge European Union fiscal rules and crack down on immigration.
'We've had a rude awakening of European political risks this week... but the situation in Spain is very different from Italy,' said Michael Metcalfe, head of global macro strategy, State Street Global Markets.
'The parties leading in the polls in Spain are centrists so we're not getting the proposals for fiscal extremes as we have in Italy.'
Many observers said Sanchez was in any case unlikely to call any vote until after European, local and regional elections take place in May next year.
He has already committed to respecting a budget passed by Rajoy, and the fragmented parliament means Sanchez will find it hard to row back on structural reforms passed by his predecessor, including new labour laws and cuts in healthcare and education.
Spanish Prime Minister Mariano Rajoy arrives for a debate on a no-confidence motion at the Lower House of the Spanish Parliament on Friday
Mariano Rajoy shakes hands with a police officer outside Spanish Parliament on Friday morning
Mariano Rajoy told Parliament on Friday that it had been an 'honour' to serve Spain as well as wishing the country 'good luck'
Spain finds its comeback kid in new leader Pedro Sanchez
Less than two years ago, the man who will become Spain's new prime minister was staring at the premature end of an unremarkable political career.
The heavyweights of Spain's Socialists had forced Pedro Sanchez' removal as their leader. Back-to-back losses by the party in general elections had left Sanchez without credit and he was ostracized after a rebellion from within his own ranks.
Fast forward to Friday: Sanchez is set to become the leader of the eurozone's fourth leading economy after completing an audacious bid to oust conservative Prime Minister Mariano Rajoy from power in a no-confidence vote.
Sanchez completed his spectacular turnaround after seizing the opportunity provided by last week's court verdict in a massive corruption case involving Rajoy's conservative Popular Party. His appeal for a government clean of scandal, coupled with a promise to hold new elections soon, brought him just enough votes in parliament to end Rajoy's six and a half years in charge.
In October 2016, Sanchez looked finished. He had lost a bid to form a government and been cast out by the party's regional chiefs. Sanchez then gave up his seat in parliament when the Socialists' caretaker leadership opted to allow Rajoy to stay in power, avoiding new elections they feared would result in even bigger losses.
Sanchez earned a victory in the Socialist Party leadership election back in May 2017
Sanchez, however, refused to go quietly. Even so, his vow to 'get in my car and visit every corner of Spain to win back' the party sounded quixotic given his scarce support among its higher echelons.
But Sanchez embraced the role of underdog and tapped into the anger of rank-and-file members who felt that he had been unfairly dumped by the party elite.
He earned a stunning victory to return as leader in May 2017 when he won an internal party election against Susana Diaz, the candidate anointed by the party's powerbrokers, including former prime ministers Felipe Gonzalez and Jose Luis Rodriguez Zapatero.
Still, the 46-year-old Sanchez, a basketball player in his youth, had never shown the political savvy to challenge Rajoy.
A political survivor and adroit parliamentarian, Rajoy had apparently cleared the biggest hurdle facing his minority government when he passed a national budget recently and said he was confident he would to see out the remaining two years of his term.
That was until last week's ruling by the National Court that delivered hefty prison sentences to 29 business people and ex-members of Rajoy's Popular Party, including some elected officials, for fraud, money laundering and tax evasion, among other crimes.
Sanchez, often criticized as lacking a feel for the moment, pounced and left lawmakers with the choice of keeping a party thoroughly tarnished by corruption in charge or making a fresh start.
In parliament on Thursday, Sanchez presented his case that Rajoy must go because Spain 'is sick and tired of serial corruption.'
'Today I have returned to this chamber for three reasons, to act in accordance with my beliefs, out of a sense of responsibility and for the sake of our democracy,' Sanchez told lawmakers.
Sanchez will now take charge of a minority government with the backing of several other smaller political parties
The move to topple Rajoy comes with Sanchez's Socialists trailing both the Popular Party and the upstart center-right Ciudadanos (Citizens) in polls.
By moving into La Moncloa palace, the seat of government in Madrid, Sanchez will recover the spotlight that he had been sorely missing since leaving parliament.
He can try to leverage his position to recharge the Socialists' support, which has been eroded by the rise of both Ciudadanos and the far-left Podemos (We Can), while he picks the most opportune moment to carry through on his pledge to call new elections.
In the meantime, he will face the pitfalls of being in charge of a minority government that will have a very tough time getting anything done. Rajoy has already warned of the 'political instability' a Sanchez-led government would suffer.
Sanchez may also pay a heavy price for taking down Rajoy. In order to secure votes against Rajoy from Catalonia's separatists, Sanchez had to promise to open talks with the secessionists about the future of the northeastern region.
Sanchez had been Rajoy's most loyal backer in his takeover of Catalonia's regional government following its failed secession attempt last year. Now, he runs the risk that both the Popular Party and Ciudadanos will label him a traitor.
An economist by education, Sanchez was chief of cabinet to the U.N. envoy to Bosnia, Carlos Westendorp, in the late 1990s. In 2003 he took a position as a city council member in Madrid and then climbed up the Socialist party ladder, first becoming a lawmaker and then party leader in 2014.
Rajoy sits with Deputy Premier Soraya Saenz de Santamaria during the Parliament session
Pedro Sanchez, addresses Members of Parliament on the second day of the no-confidence motion debate on Friday
Mr & Mrs Handsome: Pedro Sanchez and his wife Begona Gomez wave during a meeting in Madrid, Spain, June 21, 2015
Sanchez and his wife Maria Begona Gomez pose on the red carpet at the 32nd Goya awards ceremony in Madrid on February 3 this year
PM Rajoy: it's over for Spain's great survivor
He was known as the great survivor, patiently biding his time as rivals fretted around him, but Spanish Prime Minister Mariano Rajoy finally had to admit defeat Friday after six years in power.
When the Basque nationalist PNV party announced it would support a vote of no-confidence to oust Rajoy over his party's corruption woes, the game was up.
The no-confidence vote launched by Rajoy's rival Socialist party chief Pedro Sanchez proved the nail in the coffin of a man variously described as an uncharismatic and rigid do-nothing or a stellar strategist with strong political acumen.
Critics said the grey-bearded, bespectacled 63-year-old leader governed by sitting back - or going on one of his much-loved power walks - and then waiting for what ever storm lashing Spain to pass.
'The party is over,' said Joan Baldovi, a lawmaker from the eastern region of Valencia.
Former Prime Minister Rajoy was said to have governed by 'sitting back and waiting for storms to pass'
Rajoy managed to emerge relatively unscathed from a series of crises, and even walked from a 2005 helicopter crash with just a broken finger.
Despite corruption scandals that hit his conservative Popular Party (PP) and deeply unpopular austerity measures taken during his first term, the PP was re-elected in 2015.
It may have lost voters and its absolute majority, but it still came first.
The next 10 months saw an unprecedented political crisis, marked by the failure of Rajoy's bickering rivals to agree on an alternative government. Fresh elections were held and the PP won again.
In October 2016, Rajoy was sworn in as prime minister for a second term at the head of a minority government, a respectable comeback even if he was weakened.
More trouble followed, not least Catalonia's failed attempt to break from Spain last October.
There again, he was criticised for doing little to ease the situation but his eventual imposition of direct rule on the deeply divided northeastern region did not spark the unrest many had expected.
The latest corruption scandal involving a PP slush fund damaged him badly however, with the court questioning the credibility of his testimony as it jailed 29 people.
Satirists liked to mock Rajoy's infamous truisms - Spain 'is a great country full of Spanish people' was one such declaration in 2015.
While his talent may not lie in speech-making, he often shone in parliament with witty repartee.
On Thursday, Rajoy launched a last-ditch defence against the no-confidence vote, listing the many graft cases also involving the Socialists over the years.
'Are you Mother Teresa of Calcutta? With what moral authority do you speak?' he asked Sanchez.
Rajoy is married with two sons and a keen football fan, but little else is known about his private life, and his wife Elvira Fernandez is very rarely seen in public.
Born in 1955 in Santiago de Compostela in the conservative northwestern Galicia region, Rajoy is the eldest son of a provincial court president.
Trained as a lawyer, Rajoy turned to politics at a young age, joining the Popular Alliance, the party founded by ministers of former dictator Francisco Franco which later became the PP.
He later became the right-hand man of Jose Maria Aznar, who led Spain from 1996 to 2004, serving in several ministerial posts.
Aznar appointed him as his successor, but Rajoy went on to lose two general elections to the Socialists before voters finally handed him the premiership in 2011 as Spain suffered the ravages of an economic crisis.
With an absolute majority in parliament, Rajoy implemented deeply unpopular severe spending cuts and labour law reforms.
Anton Losada, a politics professor at the University of Santiago de Compostela who has written a book about Rajoy, said the party may not be completely over.
He said there was still a chance Rajoy could come back as early elections will likely be called, he will likely be the PP's candidate again... and possibly win.
'I think you can only say Rajoy is dead when he's actually dead, not before.'