Rapper Hasel was convicted for glorifying terrorism, slander and libel against the crown and state institutions over tweets that called former King Juan Carlos I a mafia boss and accused police of torturing and killing demonstrators and migrants.
Several thousand protesters hit the streets of Barcelona after police stormed a university to arrest an outspoken rapper, who had barricaded himself inside to avoid jail over a string of tweets in a controversial free speech case.
"They will never make us give in, despite the repression," shouted Pablo Hasel, 32, his fist raised as officers in riot gear escorted him out of the building after an early-morning raid on the Catalan university where he'd been holed up.
"It is the fascist state that is arresting me. Death to the fascist state!"
Hours after his arrest, protesters hit the streets in at least three of the region's cities, with some 1,700 people rallying in central Barcelona waving banners and placards saying "Free Pablo."
But as the demonstration began to disperse, a handful of protesters began torching large rubbish bins and hurling stones and other objects at police, who charged at them, an AFP correspondent said.
Similar incidents took place in Lleida where the rapper was arrested, with hundreds scuffling with police and torching wheelie bins and a police motorbike according to RTV public television.
Police also said there were scuffles in the northern city of Girona, while footage on Twitter showed a standoff between a handful of police and protesters in the eastern city of Valencia.
Hasel had been given until last Friday night to turn himself in to begin serving his sentence after being convicted for glorifying terrorism, slander and libel against the crown and state institutions.
At issue was a series of tweets calling former king Juan Carlos I a mafia boss and accusing police of torturing and killing demonstrators and migrants.
Hasel is known for his hard-left views, but his case has become a cause celebre among campaigners who say that prosecuting him is a dangerous assault on free speech.
On Monday, he barricaded himself inside the Lleida University, 150 kilometres (90 miles) west of Barcelona, with dozens of supporters.
Early on Tuesday, officers in protective gear broke through several barricades and detained him.
'Excessive and disproportionate'
Amnesty International denounced the move saying jailing the rapper for song lyrics and tweets was "unjust and disproportionate."
"Pablo Hasel's imprisonment is an excessive and disproportionate restriction on his freedom of expression, but he is not alone in suffering the consequences of unjust laws," the NGO wrote on Twitter.
Hundreds of artists signed a petition calling for Hasel's release, including film director Pedro Almodovar, Oscar-winning actor Javier Bardem and folk singer Joan Manuel Serrat.
Last week, the government pledged to reduce the penalty for "crimes of expression" such as the glorification of terrorism, insults to the crown and offences against religious sensibilities in the context of artistic, cultural or intellectual activities.
Deputy Prime Minister Carmen Calvo on Tuesday reiterated the government's plans to reform the law.
"In the area of freedom of expression there should be margin for understanding and tolerance in a mature democracy like ours," she said, but refused to comment on Hasel's arrest.
Speaking to AFP on Friday, Hasel said he had no intention of turning himself in.
"I refuse to go of my own accord... so they'll just have to come and kidnap me, which will show up the state for what it really is: a phoney democracy."
Fellow rapper's 'shame and anger'
Far-left party Podemos, the junior partner in Prime Minister Pedro Sanchez's minority coalition government, criticised Hasel's arrest.
"All those who consider themselves progressives and boast of [Spain's] 'full democratic normality' should be ashamed," the party tweeted.
"There is no progress if we refuse to recognise our existing democratic shortcomings."
Hasel's case echoes that of another rapper, Valtonyc, who fled to Belgium in 2018 after being convicted of similar crimes.
Spain wants him extradited but Belgium has refused as his offences are not a crime under Belgian law.
Valtonyc told AFP he felt "shame" and "anger at seeing a colleague treated like this for doing what artists do, which is to provoke."
He said: "Artists are now going to suffer the worst type of censorship, which is self-censorship.
"There are many songs that will not be written, plays that will stop being written, all out of fear."