A spokesman for the Mossos d'Esquadra regional police told AFP up to 700 protesters attended the rally which later turned violent when a group of some 50 people “began throwing dangerous objects” at police, prompting them to try and break up the crowd.
An AFPTV correspondent in the central Plaza Sant Jaume saw scores of demonstrators wearing face masks, many chanting “freedom”, hurling rocks and crowd control barriers at police in full riot gear as the surrounding streets filled with smoke from burning barricades.
Sirens wailed throughout the city centre as police sought to disperse the protesters with batons and firefighters hosed down fires in several large wheelie bins.
Twenty police officers were injured in the clashes and twelve people were arrested, the regional police said on Twitter.
At least two establishments were looted and several police vehicles damaged, it added.
A protest in the northern Spanish city of Burgos also turned violent when several dozen young protestors began throwing bottles and stones at police and torching rubbish bins, the Diario de Burgos news website reported.
“What's happening in Burgos tonight only brings more pain and destruction.
Anger won't get us out of here,” tweeted Francisco Igea, number two in the Castilla y Leon region.
Despite the many restrictions imposed in Spain since July, when the number of cases began rising again, infections have spiralled with the virus claiming more than 35,000 lives and infecting more than 1.1 million people.
Almost all of Spain's regions have imposed border closures in the hope of avoiding a new lockdown, but in Catalonia, where bars and restaurants have been closed since mid-October, the authorities have imposed extra restrictions.
Residents have been barred from leaving towns and cities over the weekend with police on Friday checking drivers on the main roads leading out of Barcelona.