Spanish rapper Pablo Hasel was arrested by police on Tuesday in the Catalan university where he had been holed up since being sentenced to nine months in jail for a string of tweets alleging state torture and murder.
"They will never make us give in, despite the repression," Mr Hasel said as he was led away.
A Catalan police spokesman told AFP that officers entered the university early Tuesday "to enforce the judicial ruling" on his arrest.
Wearing protective gear, they removed chairs, rubbish bins and other objects that had been set up as barricades to reach the spot where the singer was barricaded with his supporters.
Pablo Hasel, whose real name is Pablo Rivadulla, is known for radical leftist views.
He was prosecuted after he posted a string of tweets attacking the monarchy and accusing the police of torturing and killing demonstrators and migrants.
His case sparked protests in Madrid and Barcelona, and dozens of his supporters joined him inside the University of Lleida on Monday which is located 150 kilometres west of Barcelona.
"I'm locked inside the [university] with quite a few supporters so they'll have to break in if they want to arrest me and put me in prison," he wrote on Twitter on Monday.
The rapper had been given until Friday night to turn himself in to begin his sentence after being convicted for glorifying terrorism, as well as slander and libel against the crown and state institutions.
"I refuse to go of my own accord and knock on the prison door, so they'll just have to come and kidnap me," he said on Friday.
Hundreds of artists signed a petition demanding his release, including film director Pedro Almodovar, Hollywood actor Javier Bardem and folk singer Joan Manuel Serrat.
Last week, Spain's government pledged to reduce the penalty for "crimes of expression", such as the glorification of terrorism, hate speech, insults to the crown and offences against religious sensibilities, in the context of artistic, cultural or intellectual activities.
The case echoes that of another rapper called Valtonyc, who fled to Belgium in 2018 after being convicted of similar crimes.
Spain is trying to have him extradited but Belgium has refused on the grounds that his offences are not a crime under Belgian law.