
Spain has a new prime minister after a parliamentary vote Friday led to the ousting of incumbent Mariano Rajoy.
Speaking to the Spanish parliament just before the vote, Rajoy said he would accept the result and wanted to be the first to congratulate the leader of the opposition Socialist Party, Pedro Sanchez, as his successor.
A long-running corruption trial — known as the Gurtel case — found dozens of people linked to Rajoy's governing People's Party (PP) guilty of benefiting from illegal kickbacks. That prompted Sanchez to push for a vote of no-confidence against Rajoy.
Sanchez won the vote Friday after securing the backing of six smaller parties, including that of the Basque Nationalist Party and two parties that support Catalan independence. The left-of-center Podemos party also said it would back Sanchez.
Ciudadanos, a right-of-center party that enjoys strong support in Spain, refused to back the new coalition.
Market reaction has been mildly supportive. The Spanish , which accounts for the country's largest listed companies, was higher by almost 2 percent on Friday morning.
The euro was largely flat against the dollar while Spanish bond prices ticked higher. Spain's political upheaval is viewed by investors as more favorable than neighboring Italy's as most Spanish parties cast themselves as pro-European.
The socialist leader Sanchez has promised to stick to a budget recently approved by parliament and with pure control of only 84 of 350 seats, enacting change is seen as difficult. The next general election in Spain is due to take place by mid-2020.

Jose Ramon Garcia-Hernandez is an MP & International Spokesperson for Rajoy's Partido Popular.
He told CNBC's Squawk Box Europe on Friday that today's vote would cause a political upheaval.
"It looks like we are going to have the perfect storm in parliament. What we have seen today is unprecedented in Spanish constitutional history and I think it is going to put a big doubt over the new government's future," he said.
Ciudadanos is the largest party in the polls but will have no role in the new government. An economic advisor to Ciudadanos, Luis Garicano, said the new "Frankenstein coalition" would bring a risk to Spanish budgetary responsibility.
"The only thing that will hold this strange coalition together will be removing some constraints that were imposed by Europe and budget responsibility," he told CNBC's "Street Signs."
Garicano added that he expected the new government to be a test of Spanish unity.

Also speaking Friday, Antonio Barroso, managing director of Teneo Intelligence, said he agreed that the new leader would have a difficult time holding the new administration together.
On the particular issue of Catalonian independence, Barroso said there would be a change in tone from the incoming administration, but there would be no solution for both sides.
"The problem that we have in Catalonia is one of massive polarization that has been caused by the pro-independence movement," he told CNBC's "Street Signs."
"As long you have a government in Catalonia that tries to defy the constitutional order, I don't think that Sanchez will have any willingness to negotiate."