MADRID (AP) 鈥 Spain's Socialist Party has struck a deal with a fringe Catalan separatist party to grant an amnesty for potentially thousands of people involved in the region's failed secession bid in exchange for its backing of acting Spanish Prime Minister Pedro S谩nchez in forming a new government.

Socialist lawmaker and party official Santos Cerd谩n announced the deal Thursday in Brussels after sealing the agreement with the party led by , who fled to Belgium after leading the failed 2017 independence attempt for Catalonia.

鈥淭his is a political agreement and an agreement for an amnesty,鈥 Cerd谩n said.

The decision greatly boosts S谩nchez鈥檚 chances of forming another minority leftist coalition government. S谩nchez, a Socialist and Spain鈥檚 leader since 2018, still needs the backing of a small Basque party, but he is likely to achieve that.

An amnesty has been the crucial part of difficult negotiations by representatives of S谩nchez鈥檚 caretaker leftist government to win the support of two Catalan pro-independence parties. The backing of Puigdemont鈥檚 Junts (Together) and their rival Republican Left of Catalonia party, which gave its backing to S谩nchez last week, is vital if S谩nchez is to be reelected prime minister following an in July.

While the two radical parties hold just seven seats each in the 350-member parliament, only they can put S谩nchez over the necessary threshold of 176 votes in an investiture session that is expected to be held in the coming days. If no government can be formed by Nov. 27, the parliament would be dissolved and a new election called for January.

The amnesty would benefit Puigdemont and scores of others, from minor government officials to ordinary citizens, who ran into legal trouble for their roles in Catalonia鈥檚 illegal secession attempt that brought Spain to the brink of rupture six years ago.

Spain鈥檚 courts are still trying to have Puigdemont extradited from Belgium. Given that he is considered an enemy of the state for many Spaniards, any deal that benefits him is politically toxic.

Puigdemont gave a separate statement after Cerd谩n spoke in which he made a passing mention of the amnesty and said nothing about his own legal future. But he underscored repeatedly that the agreement was a big victory for his cause.

The agreement included a commitment for the two sides to meet again in November to discuss Junts' proposal to give Catalonia more control over its tax revenue and to debate holding a binding referendum on independence, while acknowledging that the Socialists were opposed to such a measure.

鈥淲e have not accepted that we have committed any crime, we have not had to ask for forgiveness,鈥 Puigdemont said.

Cerd谩n said the amnesty legislation, which will need the support of several smaller left-wing and regionalist parties to be passed, will cover all crimes and alleged crimes related to the Catalan separatist movement from 2012 until now.

鈥淪ix years have passed (since the secession attempt) and the conflict is still unresolved,鈥 Cerd谩n said. 鈥淥ur goal is to start a new chapter 鈥 where the errors of the past are no longer obstacles to overcome.鈥

The amnesty is fiercely opposed by the main conservative opposition Popular Party and the far-right party Vox as well as by many in the judiciary.

Tens of thousands of people have rallied in Madrid and Barcelona against the amnesty in recent weeks.

Violence broke out late Thursday night outside the Socialist Party鈥檚 headquarters, after four consecutive nights of protests. Bottles, beer cans and fireworks were thrown at a heavy police cordon, and officers moved in using batons to break up the protests and make arrests.

More protests have been called by the Popular Party for Sunday.

The amnesty talks have also fallen under the scrutiny of the European Union. EU Commissioner of Justice Didier Reynders sent Spain鈥檚 government a request for more information this week.

It is likely to end up in Spain鈥檚 Constitutional Court for a judicial review.

Even though support for Catalan separatism lost support in the July election, Junts and Republican Left for Catalonia used their leverage given to them by the fragmented chamber and made an amnesty law a prerequisite for supporting S谩nchez. They also demanded an independence referendum in the region, but S谩nchez has so far ruled that out.

Prior to the election outcome, S谩nchez was opposed to an amnesty. But now he says an amnesty is necessary to bring about a return to normal political life in the northeast region.

When S谩nchez came to power, he inherited a Catalonia with around half the population wanting independence and where there were regular protests in Barcelona and other towns that sometimes turned violent. His decision to grant of the movement helped to reduce tensions and chipped into the popular support for separatist parties.

No one doubts that he is now willing to sweep away their alleged crimes purely out of political necessity, given how divisive the Catalan independence issue is both inside Catalonia and the rest of Spain. Even former Socialist Prime Minister Felipe Gonz谩lez has said that S谩nchez wouldn鈥檛 be doing it if he didn鈥檛 need the extra parliamentary support.

Puigdemont considers himself a political exile, while Spain鈥檚 government and many Spaniards say he is a politician who violated the law when he defied court warnings and held an authorized independence referendum in October 2017 before issuing a declaration of independence that won no international recognition. He then slipped across the border to avoid a legal crackdown that landed several of his Cabinet members in prison.

While admitting that his Socialists and the separatists are still diametrically opposed on their vision of a united, or divided, country, Cerd谩n said that the deal is not just to help S谩nchez form a government, but to secure the separatists鈥 support during the entire four-year legislature.

Given Puigdemont鈥檚 track record of trying to destabilize the Spanish state, many expect the legislature to be a bumpy ride for S谩nchez.

___

Wilson reported from Barcelona, Spain.

The 春色直播 Press. All rights reserved.