Angry demonstrations first erupted on Tuesday, February 16th, after police detained Pablo Hasel, 32, and took him to jail to start serving a nine-month sentence in a highly contentious free speech case.
Since then, protesters have turned out every night, clashing with police in disturbances which began in Hasel's home region of Catalonia, but have since spread to Madrid and beyond.
Ahead of the rallies, police were out en masse to head off any of the violence that has marred earlier protests, with dozens of police vans lining the streets of Madrid and Barcelona.
Several thousand demonstrators began gathering around 7.00 pm in Barcelona, and clashes broke out as they started marching towards the police headquarters.
Protesters hurled bottles, cans and firecrackers at police, who charged at them as smoke poured into the air from burning barricades, an AFP correspondent said.
Others smashed their way into shops along Barcelona's glitzy Passeig de Gracia shopping avenue, looting stores such as Nike, Versace, Tommy Hilfiger, Hugo Boss and Diesel.
They also attacked the Barcelona stock exchange building and torched several motorbikes.
The Mossos d'Esquadra regional police said nine people had been arrested at demonstrations across Catalonia, six of them in Barcelona. And the region's emergency services said six people had been injured, two in Barcelona.
People taking photos of the looting on Passeig de Gracia in Barcelona. Image: Pau Barrena / AFP
Protester loses an eye
In Madrid, around 400 people gathered under a heavy police presence in the city centre, chanting and clapping as curious shoppers stopped to watch.
“Free Pablo Hasel!” they yelled as a helicopter flew overhead and at least 17 police vans could be seen lined up along Gran Via, Madrid's busiest shopping street.
Earlier several hundreds had gathered in the southern cities of Malaga, Cordoba and Seville, local media reported, with another 100 protesters gathering in the northern city of Santander and a similar number in Logroño.
So far, more than 100 people have been arrested in the protests over Hasel, and scores more injured in the clashes, among them many police officers and a young woman who lost an eye after being hit by a foam round fired by police.
The clashes have also sparked a political row that has exacerbated a divide within Spain's leftwing coalition, which groups the Socialists of Prime Minister Pedro Sanchez and the hard-left Podemos.
While the Socialists have firmly opposed the violence, Podemos' leadership has backed the protesters.
The party emerged from the anti-austerity “Indignados” protest movement that occupied squares across Spain in 2011. Their position is that the Hasel case exposes Spain's “democratic shortcomings”.
Known for his hard-left views, Hasel was handed a nine-month sentence over tweets glorifying terrorism and videos inciting violence. The court ruling said freedom of expression could not be used “as a 'blank cheque' to praise the perpetrators of terrorism”.
He was also fined about 30,000 euros for insults, libel and slander for tweets likening former king Juan Carlos I to a mafia boss and accusing police of torturing and killing demonstrators and migrants.