Catalan police arrested eight people on Tuesday for their role in the protests in support of jailed rapper Pablo Hasel.

They were accused of attempted homicide, public disorder and belonging to a criminal group.

The protests began two weeks ago after Hasel was arrested for a series of tweets and rap lyrics. He was sentenced to nine months in prison for glorifying terrorism and insulting the monarchy and Spanish institutions.

The ruling was viewed by many, including organizations like Amnesty International, as an attack on freedom of expression.

Since then, protests and rioting have become a near-nightly occurrence, especially in Catalan cities like Barcelona. Although many protesters are peaceful, most of the rallies have devolved into violent clashes with the police.

Protesters routinely set barricades on fire made of garbage containers and other moveable objects from the streets. They throw objects at police, loot shops and cause widespread damage to public and private property. Dozens of people have been injured and more than 150 people have been arrested across Spain.

On Saturday night, however, the rioters crossed a new line in Barcelona. They poured flammable liquid on a police van and set it on fire, cheering as an officer inside the vehicle scrambled to get out, which he eventually did.

Police said Tuesday they caught the master-minds of the “attempted homicide”. Six of them are Italian, one is French and another is Spanish.

“During the latest protests, Catalan police noticed an extremely active group that was highly organized and committing violent acts against police officers… they took advantage of the large number of protesters to promote violence and generate as much confusion and difficulties as possible for police officers,” said the Catalan police in a statement.

Seven of them were arrested on Saturday night and another was arrested later, said police.

On Monday, police searched the abandoned warehouses that the group had allegedly occupied, looking for evidence that could tie them to the violence.