Protests in Palma this week. | Jaime Morey

Spain's acting Prime Minister Pedro Sanchez moved closer to clinching another term in office today after securing the backing of Basque nationalist party PNV, after opponents of his proposed amnesty for Catalan separatists clashed with police.

The PNV's support, and that of Catalan separatist party Junts confirmed on Thursday, would take Sanchez over the line with an outright majority in the 350-member lower house in a vote due to take place in the coming days.

"We have managed to secure a majority that will make possible the investiture of Pedro Sanchez," acting minister for parliamentary relations Felix Bolanos, said in an interview with SER radio station.

The more complicated deal was the one secured on Thursday with Junts, which includes passing a law granting amnesty to those convicted over Catalonia's attempt to secede from Spain.

"We have very far apart and different positions but this deal means we are doing our best to understand each other. Spain and Catalonia deserve that," Bolanos said.

After an inconclusive election held on July 23, Sanchez's Socialist Party spent weeks negotiating with smaller parties including far-left platform Sumar and Catalan, Galician and Basque nationalist parties, most of which had supported Sanchez early in 2020 for his previous term.

With Junts and PNV and the national and regional left wing parties, Sanchez would win an absolute majority of 178 out of 350 lawmakers. Bolanos said the Socialist Party is still talking to the Canary Islands' regionalist party Coalicion Canaria, which holds another seat in the lower house, to further increase the majority.

Bolanos said the Catalan amnesty law would appease the mood in Catalonia as it would free school directors, firefighters and other civil servants who helped organising an illegal referendum on the region's independence in 2017 from legal proceedings.

The most divisive aspect of the proposed amnesty though is it would allow Catalan separatist leaders such as Junts head Carles Puigdemont, who fled the country in the wake of the referendum and a short-lived unilateral independence declaration, to run for office again.

Sanchez's conservative opponents have accused him of putting the rule of law in Spain on the line for his own political gain. Spanish judges have also said the amnesty would be a violation of the principles of constitutional checks and balances.

As a deal between Junts and the Socialists edged nearer in the past week, the mood in the country has become increasingly febrile, with protesters clashing with police outside the Socialists' headquarters in Madrid each evening.

Police fired rubber bullets, 24 people were arrested and seven police officers were lightly injured on Thursday evening, authorities said, as officers tried to break up the demonstration.