As Spain's Socialists have just signed a pact with the pro-independence Catalan party, we explain why the deal has sparked violent protests on the streets of Madrid.
After six days of protests, tensions remain high on the streets of Madrid.
On Tuesday night, around 7,000 people gathered outside the Socialist Party headquarters when the demonstrations turned violent.
Radicals monopolised the front row, throwing bottles and even barriers at police who moved in to disperse the group.
The streets of several Spanish cities have been filled with people opposing negotiations between Spain's acting government and Catalan separatist parties over a possible amnesty for thousands involved in Catalonia's independence movement.
In central Madrid, people chanted "Sánchez, son of a b****" and "Puigdemont to jail", referring to acting prime minister Pedro Sánchez and Catalan independence leader Carles Puigdemont, who is currently in self-imposed exile in Belgium.
A total of ten people were arrested, and health workers treated 39 people, 30 of them police officers.
"Today is historic," said journalist Vito Quiles on his social networks.
"(The amnesty) is humiliating. They didn't take into account the opinion of half the population," two pensioners who took part in the demonstration told El País.
The agreement signed on Thursday between the Socialist Party and Puigdemont's party moves the country away from a de-escalation of tensions, but why are Spaniards so angry with Sánchez?
‘The beginning of the end of democracy’
Madrid's Calle Ferraz, where the Socialist Party headquarters are located, has been the scene of Spanish discontent for days.
Pedro Sánchez, acting prime minister and leader of the Socialists, was negotiating with Catalan separatist parties to secure their support in his bid to form a new government and keep his centre-left coalition in power after an inconclusive national election in July.
But the demands of the Catalan pro-independence parties have not gone down well with the public.
Among the promises that Pedro Sánchez made to these parties was the cancellation of 20% of Catalonia's debt to the state, which amounts to €15 billion.
Following an outcry from the other regions, the Socialist Party assured them the agreement would be extended to the other regional debts.
However, the Junts per Catalunya party - led by Puigdemont - still holds the key to Sánchez's government.
The seven seats they won in the last general election are essential for the Socialists to return to government.
What they are demanding in exchange for these coveted seats is what has most inflamed Spaniards: amnesty for political leaders implicated in Catalonia's independence bid.
"The landscape is very worrying. On the one hand, the investiture negotiations are aberrant. On the other hand, dangerous steps have been taken in the recent protests," Óscar Sánchez-Alonso, professor of politics at the Faculty of Communication of the Pontifical University of Salamanca, told Euronews.
"Alongside those who are legitimately and peacefully expressing their dissatisfaction, there is also a growing concentration of groups willing to use violence, and in some sectors the idea has taken hold that if the law doesn't apply to some, it is logical to break it in other directions,” he added.
The pro-independence parties have stated that "all those who were repressed, without exception" will benefit from the amnesty - a total of 1,432 people, according to calculations by the pro-independence organisation Òmnium Cultural.
It is a decision that has divided Spanish society, with 56.5% of the country against it, according to the latest poll by Simple Lógica, which specialises in public opinion research.
The judges also wanted to have their say. The main association of magistrates has issued a very strong statement against the approval of an amnesty.
“It is the beginning of the end of our democracy,” it said, adding that the amnesty law “is not allowed by the Constitution”.
Who would benefit from the amnesty?
As demonstrations took place in Spanish cities, the Socialist Party has been negotiating 'intensively' with Puigdemont's party to reach an agreement signed this Thursday.
Negotiators said the unrest in Madrid had not affected talks with the pro-independence parties.
Of the more than 1,400 people who would benefit from the future amnesty law, politicians top the list. The first major beneficiary is Puigdemont, who faces charges of disobedience and embezzlement.
The list of names includes politicians, mayors, civil servants and also citizens charged with public disorder or even terrorism.
Although the negotiations have not been made public, the main stumbling block preventing the two parties from reaching an agreement was Puigdemont's demand that the amnesty not exclude some of his entourage.
Spanish media suggest that some of these people are under investigation or have been convicted of crimes unrelated to the independence declaration.
For example, the former president of the Catalan parliament, Laura Borràs, who was convicted of splitting public contracts in favour of a friend; or Puigdemont's lawyer, Gonzalo Boye, who is being investigated for allegedly laundering drug money.
However, the protests are not only taking place outside the Socialist Party headquarters, but also within its own walls.
Party heavyweights have openly spoken out against them, to the point of creating an internal war.
"In some cases, the debate has been resolved with the expulsion (of the member) from the Socialist Party; other voices, such as Felipe González, ex-president of the Socialist government, have been dismissed as past history with little to contribute," points out Sánchez-Alonso.
For Paloma Román, director of the School of Government at Madrid's Complutense University, there are dissenting militants in every party, but the tension caused by the recent riots could help the Socialists to close ranks around the amnesty.