By Raul Cadenas Susana Vera

MADRID - About 170,000 people marched through Madrid on Saturday in the largest protest yet against an amnesty law which Spain's Socialists agreed over Catalonia's 2017 separatist bid in order to form a government.

The demonstration, the latest in a series of protests in cities across the country against the amnesty, took place two days after Spain's Socialist Prime Minister Pedro Sanchez won a four-year term with the backing of Catalan and Basque nationalist parties in return for agreeing to the law.

Protesters, many waving Spanish flags and holding signs that read "Sanchez traitor" and "Don't sell Spain", demonstrated against the law which four judicial associations, opposition political parties and business leaders said threatens the rule of law and the separation of powers.

Authorities put the number of demonstrators at 170,000.

Alberto Nunez Feijoo, leader of the opposition conservative People's Party, and Santiago Abascal, leader of the far-right Vox party, also attended the march which was organised by civil groups.

After the rally, hundreds of people protested in the motorway near the Moncloa Palace, the prime minister's residence in Madrid. The A6 road was closed for about an hour during the protest but later reopened after the police cleared the area.

A small protest was held outside the Spanish Embassy in London.

The amnesty will cover about 400 people involved in the independence bid that came to a head in 2017, including separatists but also police involved in clashes with activists.

The independence referendum was declared illegal by the courts and resulted in Spain's worst political crisis for decades.

The amnesty will be the largest in Spain since the 1977 blanket amnesty for crimes committed during the Francisco Franco dictatorship, and the first amnesty law approved in the European Union since 1991, according to Spain's CSIC research council.

Sanchez, who won a parliamentary vote to form a new government on Thursday by 179 votes in favour and 171 against, has defended the law saying an amnesty would help to defuse tensions in Catalonia.

Protesters, including neo-Nazi groups, have held rowdy demonstrations outside the Socialist headquarters in Madrid for 15 nights consecutively since the deal was announced. There have been clashes with police which left officers and demonstrators injured but in general the protests have been peaceful.

In a survey by Metroscopia in mid-September, around 70% of respondents - 59% of them Socialist supporters – said they were against the idea of an amnesty.