MADRID—Spain’s Pedro Sánchez was reelected as prime minister by the nation’s parliament on Thursday, when he leveraged a controversial amnesty deal to get the critical support from Catalan separatists to stay in power.
Mr. Sánchez, Spain’s Socialist leader since 2018, was backed by 179 lawmakers in the 350-seat lower house of parliament to form a new minority leftist coalition government. Only right-wing opposition deputies voted against him.
The vote came after nearly two days of debate among party leaders that centered almost entirely on an amnesty deal for Catalonia’s separatists that Mr. Sánchez agreed to in return for vital support to unlock another four-year term.
Mr. Sánchez won the vote after clinching the support of six smaller parties—including two Catalan separatist parties that command 14 seats—in recent weeks, allowing his Socialists to once again team up with the left-wing Sumar (Joining Forces) party in government.
It remains to be seen if Mr. Sánchez can maintain enough support to exhaust his mandate that can run until 2027 given that some of his backers are parties that want to break Catalonia, or the Basque Country, away from Spain.
Spain’s inconclusive national elections on July 23 left a highly fractured parliament. The center-right Popular Party received the most votes in the elections but failed to get enough support to form a government because of its alliances with the right Vox party, which finished third.
The amnesty deal would clean the slate for hundreds of Catalan separatists in legal trouble following the northeast region’s illegal 2017 secession bid that sparked Spain’s biggest crisis in decades. That includes benefiting former Catalan regional president Carles Puigdemont, who is a fugitive from Spanish law and considered public enemy No. 1 by many Spaniards.
Despite lingering disagreements, the two Catalan parties as well as two Basque ones said they would back Mr. Sánchez on Thursday but let him know that he must fulfill the economic and political deals reached with each of them.
The agreements with the Catalan parties include opening talks on the possibility of holding an authorized referendum for independence for the wealthy northeast region, but within the legal framework of Spain’s Constitution. Mr. Sánchez has repeatedly said that he would not permit a vote that could break up Spain.
The amnesty proposal has been heavily criticized by Spain’s judiciary, which considers it a violation of the separation of powers. The European Union is reviewing it.
The proposal sparked street protests backed by the Popular Party and Vox, which accuse Mr. Sánchez of betraying the nation just to stay in power. Protests outside the Socialist party’s headquarters in Madrid turned ugly last week and again on Wednesday night.
“The only real reproach that the right makes against us is that with these agreements we will have won the government. Which is what is going to happen today,” Sánchez told lawmakers before they voted.
“I told the president that he had made a mistake, but he is the one responsibility for it. The amnesty is the worst way to start the legislature,” Popular Party’s Alberto Núñez Feijóo, the opposition leader, said after Mr. Sánchez received an ovation from his Socialists for having won reelection.
The speaker of the house will now convey the result to King Felipe VI. Once published in the State Gazette, Mr. Sánchez will be sworn as the new prime minister before the king, most likely on Friday.