King Felipe greets Mariano Rajoy in July. REUTERS

After a 10-month political impasse, Spain looks set to have a government by early November. The Socialist Party’s (PSOE) decision on Sunday to lift a veto that has blocked the Popular Party (PP) in Congress means that Prime Minister Mariano Rajoy will return to office at the head of a minority administration.

Rajoy will rule without the support of any of Spain’s three other main parties, with just 137 deputies out of 350. He will be forced to negotiate every step of the new legislature, seeking support from the emerging center-right Ciudadanos grouping, as well as other groups.

The decision avoids Spaniards returning to the polls for a third time in a year

All that is required now is a meeting between Rajoy and King Felipe and then two rounds of voting in Congress at which the Socialist Party will most likely abstain, allowing Rajoy to form a minority government toward the end of next week.

If the Socialists had not agreed to abstain at the upcoming investiture vote, the country would have had to return to the polls for a record third time in a year. Javier Fernández, who is in charge of the PSOE until it elects a new leader, has described the party’s position as “the lesser of two evils.”

The Socialist Party’s decision to lift its veto came after a special meeting held in Madrid on Sunday, with 139 regional leaders voting to allow Rajoy to form a government, and 96 opposing the move. The question has divided the party, with its former leader, Pedro Sánchez insisting for the last 10 months that he had widespread support among the grass roots for his refusal to allow Rajoy back into office. He stood down on August 31.

In the first round of voting in Congress next week, Rajoy will likely garner 170 votes: the PP’s, along with those of Ciudadanos and the Canaries Coalition. A second vote will take place two days later, on Saturday or Sunday. The Socialists will abstain, thus opening the door to Rajoy to return to office.