Madrid, Oct 30 Mariano Rajoy was re-elected as Prime Minister of Spain after his investiture was ratified by the Congress.
"With courage, strength and determination we managed to overcome many of the challenges we had to face in the last four years, and I'm sure we can do the same again," he said after the result was announced on Saturday, Efe news reported.
The Popular Party leader needed to receive more votes in his favour than against, and the Socialist Party's (PSOE) abstention meant he received enough support from Congress members to be invested.
He received 170 votes in his favour, while 111 voted against his re-election and 68 abstained.
"I greatly appreciate all the Spanish people who voted for me and I promise I will govern well for everyone, whether they voted for me or not," he added.
He said he had already spoken to King Felipe VI, who is currently attending the 25th Iberoamerican Summit in Colombia, and that they had decided that he is to be sworn in on Friday, after announcing who will form part of his government on Thursday.
Rajoy's victory was made possible by PSOE's decision to abstain instead of continuing to vote against him.
Former PSOE leader Pedro Sánchez announced on Saturday that he was resigning from Congress because he profoundly disagreed with his party's decision but did not want to go against the PSOE Federal Committee's decision.
On October 1, he was forced to resign as party leader because he wanted to continue voting against Rajoy despite a push within the party to end the country's political block and allow Rajoy to be re-elected.
On Thursday, a similar vote was held where Rajoy had to receive at least 176 votes in his favour to be invested, but PSOE had agreed to vote against him that day and abstain on Saturday, so his re-election was blocked.
During the vote on Saturday, thousands gathered on the streets outside the Congress building to protest what they considered to be an illegitimate investiture, as Rajoy did not received a majority of votes from the Spanish people or Congress.
Spain had been embroiled in a political crisis for the last 10 months after two national elections yielded no conclusive results and several attempts at negotiating and forming a government failed.