By Belén Carreño and Joan Faus
MADRID/BARCELONA (Reuters) -After Spain's Socialists failed to clinch a majority in a July election, it was clear they would have to do a deal with smaller parties, including Catalan separatists, for Prime Minister Pedro Sanchez to remain in power.
But when the deal, forged over months of tense negotiations, finally landed on Thursday and confirmed Catalan independence activists would be given amnesty in return for their support, it still sent shockwaves around the country.
Opposition leaders described it as a "giving in to blackmail" by independence leaders, a "humiliation of the judiciary" and a signal a country not yet 50 years past the death of Francisco Franco was veering back to "dictatorship".
Just holding the deal together through a full four-year parliamentary term will be a tough challenge, many predict.
As well as committing to an amnesty, the deal Sanchez's Socialist party (PSOE) signed with the hardline Catalan party Junts agreed talks on a separatist wishlist that includes a fresh independence referendum and more control over tax revenue.
Junts chief Carles Puigdemont, in exile in Belgium where he fled to avoid charges as leader of Catalonia during the unilateral independence declaration of 2017, confirmed on Thursday his support would be conditional, dependent on a "permanent negotiation that yields results and that those are accomplished throughout the legislative term".
Without the support of Junts - and with the vengeful opposition of the conservative People's Party (PP) that controls the senate - the Socialists could struggle to pass legislation including budgets, risking a vote of no confidence against Sanchez, in power since 2018, or the forcing of a snap election.
"The next legislative term will be very tough for the PSOE, it is likely it won't finish the whole term," said Catalan political analyst Joan Esculies.
TOWN SQUARE DEMONSTRATIONS
The scale of opposition elsewhere in Spain to the deal with the separatists has been evident this week, with right-wing demonstrations outside the PSOE headquarters in central Madrid drawing their biggest numbers yet.
Spaniards have also been called to show their ire in town square demonstrations across the country on Sunday.
Spain's tax inspectors, judges and lawyers took issue with proposals that Spain might hand back taxes to the wealthy industrial region and address "lawfare", a term used by Junts to describe the alleged use of the courts to persecute pro-independence activists.
Alberto Nunez Feijoo, the leader of the centre-right PP, promised a "parliamentary and legal" fight against the amnesty bill and called for a "civil disobedience".
Even some Socialists were upset. Emiliano Garcia-Page, Socialist chief of rural Castilla-La Mancha region, blamed Puigdemont, who he said could not be trusted.
"He wants to be amnestied by the Spaniards, but if what has been agreed is not fulfilled, he will return to his old ways," he said. "That someone like this has the control of stability is cause for concern if not sadness."
The separatists made none of the concessions Madrid had originally sought, such as a repudiation of the wildcat independence bid of 2017, nor a commitment not to repeat such a move again.
A senior Catalan Socialist source said the agreement itself constituted a concession by Junts to work with Spain.
"The amnesty law must be voted by parliament, even the referendum that they request - that we do not accept - is included in the Spanish constitution," the source said.
'RISKIEST MOVE'
The agreement with Junts followed an earlier deal with the more moderate Esquerra Republicana de Catalunya and is accompanied by arrangements with other regional parties.
For all its challenges, the deal Sanchez has struck has handed him the support of 179 seats in a 350-seat congress - the broadest support he, or any other Spanish leader, has enjoyed in more than a decade.
Lluis Orriols, Professor of Political Science at Carlos III University, said while Sanchez may appear to have given too much away, the eventual amnesty law that emerges from parliament and implementation by the courts may be limited.
His bigger challenge, he said, would be to keep his regional allies on side in order to pass legislation.
"The amnesty can be forgotten but a government paralysed to pass legislation cannot," he said. "This is Sanchez's riskiest political move."
For Andoni Ortuzar, the Basque Nationalist Party leader who also struck a deal with the Socialists on Friday, whether the government could hold would be a test of Spain's plurality.
"We are different - we consider ourselves a different nation - and the question is whether we can live together comfortably," he said. "It's a nice sociological test for the future to see how this legislature evolves."