After conservative leader Alberto Nunez Feijoo failed in his bid on Friday, it is now the turn of acting Prime Minister Pedro Sanchez of the Socialists to try to strike a deal.

He needs the 14 votes Esquerra Republicana de Catalunya (ERC) and Junts hold in Spain's 350-seat lower house of parliament to achieve a majority.

In exchange, those parties are demanding an amnesty for more than 1,000 Catalan politicians and activists for their involvement in an attempt to separate the region from Spain that came to a head in 2017.

WHO ARE ERC AND JUNTS?

Centre-left ERC, founded in 1931, controls the Catalan regional government. The party's national coordinator, Pere Aragones, is the region's president.

ERC supported Sanchez's motion of no confidence in then Prime Minister Mariano Rajoy in 2018, ushering Sanchez into power.

In 2020 it abstained in an investiture vote, allowing Sanchez to form a minority coalition government. It has also lent its votes to help Sanchez pass specific legislation.

In exchange, Sanchez agreed to talks over the Catalan conflict in which nine jailed leaders were pardoned.

Junts is a spin-off of the Catalan European Democratic Party (PdeCat) and was created in 2017 by Carles Puigdemont, who was president of Catalonia when the region unilaterally declared itself independent on Oct. 27 2017.

Puigdemont, currently a member of the European Parliament, has been on the run from Spanish justice and living in self-imposed exile in Belgium since the independence movement weakened after Madrid imposed direct rule over the autonomous region.

As leader of PdeCat, Puigdemont supported Sanchez in the motion of confidence against Rajoy, but has not supported him since. Junts has taken a harder line on independence than ERC.

WHAT ARE THEIR DEMANDS?

ERC has called for further talks on the "political conflict" over independence and wants concessions including cutting the region's contributions to national public finances and to take control of local train services.

Junts wants an amnesty for those involved in the push for independence, which would include Puigdemont and other leaders living in exile and more than 1,000 politicians, officials and activists who have been convicted or are currently facing court proceedings.

Puigdemont also wants a mediation and monitoring mechanism to verify the implementation of any amnesty deal, saying he does not trust the Socialists.

Both parties have also spoken about the possibility of another referendum on independence for Catalonia, after the last vote in 2017 was ruled illegal by a court

   In recent months, they have stopped publicly demanding one as a pre-condition for talks. But the regional parliament passed a resolution on Friday saying it would not back an investiture unless the new government commits to "creating the conditions" for such a plebiscite.

HOW LARGE IS THE INDEPENDENCE MOVEMENT?

Support for independence has slipped from a high in 2017 after Spain imposed direct rule from Madrid and Sanchez toned down hostilities by opening channels of communication and making significant concessions to the pro-independence movement.

A survey published in July by the Catalan Centre for Public Opinion, operated by the regional government, found 42% supported independence compared with 49% in favour versus 43% against at the height of the crisis in 2017. However, 81% of Catalans told the same pollster in 2022 that it was their right to vote on independence in a referendum.

A cooling of enthusiasm for independence is reflected in the performance of pro-independence parties in July's national election. ERC's representation fell from 13 seats to seven while Junts fell by one seat to seven. ERC and Junts lost 550,000 votes compared with the prior election in 2019.

WHAT ARE THE ODDS FOR A DEAL?

Advisory firm Teneo estimates there is a 60% chance of a deal, with a 35% probability of a repeat election in mid-January if no agreement is reached.

Granting concessions on funding and power devolution should be feasible.

More difficult would be an amnesty law, given that it is a move that is unpopular with many Spaniards - and which Sanchez himself opposed until July.

Passing a law before the investiture would be difficult since the government is currently in caretaker mode - Sanchez will probably have to try to persuade the Catalans to accept the promise of a future bill.

Sanchez has stressed he would act lawfully, but some scholars have voiced legal concerns, saying Spain's Constitution does not allow for a general pardon.

Sanchez has all but ruled out a referendum after saying he will not go beyond the bounds of the constitution.

It will be up to Puigdemont to decide whether he is ready to forego a referendum for the sake of a deal.

(Reporting by Charlie Devereux; additional reporting by Joan Faus; Editing by Alexandra Hudson and Andrew Heavens)

By Charlie Devereux