Hundreds of thousands of people are protesting in Barcelona against the imprisonment of nine Catalan separatist leaders for their roles in an illegal 2017 secession bid.
There were clashes between some protesters and police.
Barcelona police said 350,000 people are rallying in the city, with many waving pro-independence flags for Catalonia.
The rally was organised by the main pro-secession grassroots groups who want to create a new state in north-eastern Spain.
Hundreds of mostly masked youths surrounded the National Police headquarters in downtown Barcelona and threw plastic balls at the officers on guard.
When they switched to raining down rocks and bottles, police charged with batons swinging and after a chaotic moment managed to extend a perimeter.
Nine Catalan officials were given sentences of nine to 13 years for sedition.
The sentences sparked peaceful protests in Barcelona and other nearby cities which later spiralled into violent clashes with police.
Protesters say Spain has criminalised the political process of dissent.
The president of the pro-secession grassroots group ANC, Elisenda Paluzie, said: “We cannot accept that (the prisoners) have been condemned to terms of nine to 13 years for defending the self-determination of Catalans.”
The nine Catalan officials were given sentences of nine to 13 years for sedition by the Supreme Court on October 14. Four of them were also convicted of misuse of public funds. The other three were fined for disobedience.
They were all acquitted of the more serious crime of rebellion, which carries a sentence of up to 25 years.
Spain’s government has told Catalonia’s separatists that the national parliament would need to amend the constitution, which considers the nation indivisible, to make secession by a region legal.
The largest pro-Spanish union grassroots group Catalan Civil Society has called for a rally in Barcelona on Sunday.
Roughly half of Catalonia’s 7.5 million residents opposes severing century-old ties with the rest of the country.
The Catalan crisis is set to be a key issue in Spain’s November 10 national election, where Socialist prime minister Pedro Sanchez will try to stay in power.
Earlier on Saturday, Spain’s far-right party Vox drew several thousand people to a political rally in central Madrid. Vox is trying to profile itself as the best option to stop the rupture of Spain.