A key Catalan separatist party said Thursday it would allow Spain's Socialist leader Pedro Sanchez another term as prime minister, paving the way to end months of political deadlock in the eurozone's fourth-largest economy.

The ERC's 13 lawmakers will abstain from voting in a confidence vote in parliament next week, top party official Pere Aragones said following a meeting of its national committee, a move that allows Sanchez to stay on following two inconclusive elections last year.

Sanchez's Socialists won the most seats in a repeat November general election but were weakened, falling far short of an absolute majority in Spain's 350-seat parliament.

The Socialists have struck an agreement to form a coalition government with far-left party Podemos in what would be the first such power-sharing deal since the country returned to democracy following the death of long-time dictator Francisco Franco in 1975.

The two parties together still fall short of a majority with 155 seats in the assembly. Sanchez has already secured the support of several smaller regional parties and had been negotiating with the ERC since the November polls.

Spain's Socialist leader Pedro Sanchez is seeking backing from a Catalan separatist party in parliament to secure another term as prime minister
Spain's Socialist leader Pedro Sanchez is seeking backing from a Catalan separatist party in parliament to secure another term as prime minister AFP / GABRIEL BOUYS

The announcement came after ERC and Socialists said in separate statements they had agreed to set up negotiations between Spain's central government and the Catalan government to "unblock the political conflict over the future of Catalonia and establish the basis for its resolution."

"It is a difficult, complex path. We think it is worth taking," Aragones, Catalonia's vice president, told reporters.

Catalonia has been rocked by sometimes violent protests after Spain's Supreme Court in October sentenced nine Catalan leaders to lengthy jail terms over their role in staging a banned secession referendum in 2017 in the wealthy northeastern region and a subsequent declaration of independence.

The leader of the ERC, former Catalan vice president Oriol Junqueras, was among those sentenced.

Composition of the Spanish parliament
Composition of the Spanish parliament AFP / Thomas SAINT-CRICQ

Since the failed 2017 independence bid the ERC has adopted a more moderate stance, believing it is the best way to increase support for separatism in the longer term.

But it has been criticised by some parts of the separatist camp for cosying up to a government that opposes Catalan independence and fears rival separatist parties could take electoral advantage of any perceived concessions to Madrid.

With the abstention of the ERC's lawmakers, Sanchez could secure his investiture in a second confidence vote slated for Tuesday when just a simple majority is needed.

He would still lose a first confidence vote set for Sunday when an absolute majority of 176 votes is needed.

Lawmakers will begin debating Sanchez's bid to form another government on Saturday in a rare weekend session.

Until 2015 Spain had essentially a two-party system pitting the Socialists against the conservative Popular Party (PP) but the rise of new parties has led to a more fragmented parliament that has made it harder to form a government.

Sanchez came to power in June 2018 after ousting his PP predecessor Mariano Rajoy in a no-confidence vote but he was forced to call elections in April after Catalan separatists refused to back his draft budget.

Those polls were inconclusive and he called a repeat election in November -- Spain's fourth in four years -- in the vain hope of boosting his party's standing and sparing him from relying on the Catalan separatists.

Spain's right-wing opposition accuses Sanchez of being held "hostage" to Catalan separatists by accepting the abstention of the ERC to win the investiture vote.

"Sanchez has sold Spain in exchange for remaining in power," the PP's number two, Teodoro Garcia Egea, said Thursday.