More than 50 people were arrested and dozens injured during a second night of protests that turned violent in several Spanish cities. The protests were sparked by the imprisonment of a rapper who had insulted the monarchy and praised terrorism.

The protests began peacefully late Wednesday in dozens of Spanish provincial capitals and other towns in the northeastern Catalonia region, home to the rapper Pablo Hasél. But as the evening wore on they turned violent, with rioting, impromptu barricades made from trash containers and fires, and damage to shops.

In Madrid, Barcelona and smaller cities, anti-riot police fired rubber or foam bullets at baton-charged protesters, who threw objects at officers and set trash containers alight. Some used overturned motorbikes to block streets.

Demonstrators clash with the police following a protest condemning the arrest of rap singer Pablo Hasel in Madrid, Spain, Wednesday, Feb. 17, 2021. Police fired rubber bullets and baton-charged protesters as clashes erupted for a second night in a row Wednesday at demonstrations over the arrest of Spanish rap artist Pablo Hasel. Many protesters threw objects at police and used rubbish containers and overturned motorbikes to block streets in both Madrid and Barcelona. (AP PhotoManu Fernandez)

Demonstrators clash with the police following a protest condemning the arrest of rap singer Pablo Hasel in Madrid, Spain, Wednesday, Feb. 17, 2021. Police fired rubber bullets and baton-charged protesters as clashes erupted for a second night in a row Wednesday at demonstrations over the arrest of Spanish rap artist Pablo Hasel. Many protesters threw objects at police and used rubbish containers and overturned motorbikes to block streets in both Madrid and Barcelona. (AP PhotoManu Fernandez)

In the Spanish capital alone, police arrested 19 people, including six minors. Emergency services assisted 35 injured anti-riot officers and 20 others, including protesters and people who passed by and were caught in the melee.

In Barcelona, 29 people were arrested and at least eight were injured and sent to hospitals, the regional emergency service said Thursday. The night before, a young protester lost an eye night as a result of a foam projectile used by the regional Mossos d’Esquadara police to dispel the protesters.

At least four protesters were also arrested Wednesday in the southern city of Granada.

People stand inside of a coffee bar during clash with police and demonstrators following a protest condemning the arrest of rap singer Pablo Hasel in Madrid, Spain, Wednesday, Feb. 17, 2021. Police fired rubber bullets and baton-charged protesters as clashes erupted for a second night in a row Wednesday at demonstrations over the arrest of Spanish rap artist Pablo Hasel. Many protesters threw objects at police and used rubbi6h containers and overturned motorbikes to block streets in both Madrid and Barcelona. (AP PhotoManu Fernandez)

People stand inside of a coffee bar during clash with police and demonstrators following a protest condemning the arrest of rap singer Pablo Hasel in Madrid, Spain, Wednesday, Feb. 17, 2021. Police fired rubber bullets and baton-charged protesters as clashes erupted for a second night in a row Wednesday at demonstrations over the arrest of Spanish rap artist Pablo Hasel. Many protesters threw objects at police and used rubbi6h containers and overturned motorbikes to block streets in both Madrid and Barcelona. (AP PhotoManu Fernandez)

Some of the gravest riots on Wednesday night took place near the Lleida prison, where Hasél was taken Tuesday. Police arrested him at a university building where he had barricaded himself 24 hours earlier to draw attention to his arrest.

The rapper and his supporters say that Hasél's nine-month sentence for writing a critical song about former King Juan Carlos I and dozens of tweets that judges said glorified some of Spain's extinct terrorist groups violates free speech rights.

Before that case, the rapper had been given a suspended two-year sentence and faced other charges for assault, praising armed extremist groups, breaking into private premises and insulting the monarchy.

Police officers take position next to a barricade during clashes following a protest condemning the arrest of rap singer Pablo Hasél in Barcelona, Spain, Wednesday, Feb. 17, 2021. Police fired rubber bullets and baton-charged protesters as clashes erupted for a second night in a row Wednesday at demonstrations over the arrest of Spanish rap artist Pablo Hasél. Many protesters threw objects at police and used rubbish containers and overturned motorbikes to block streets in both Madrid and Barcelona. (AP PhotoFelipe Dana)

Police officers take position next to a barricade during clashes following a protest condemning the arrest of rap singer Pablo Hasél in Barcelona, Spain, Wednesday, Feb. 17, 2021. Police fired rubber bullets and baton-charged protesters as clashes erupted for a second night in a row Wednesday at demonstrations over the arrest of Spanish rap artist Pablo Hasél. Many protesters threw objects at police and used rubbish containers and overturned motorbikes to block streets in both Madrid and Barcelona. (AP PhotoFelipe Dana)

His legal situation has drawn considerable public attention because it comes on the back of a string of other artists and social media personalities that have been put on trial for violating Spain's 2015 Public Security Law, which was enacted by a previous conservative-led government and criticized by human rights organizations.

Spain’s left-wing coalition government wants to change the country’s criminal code to eliminate prison terms for offenses involving freedom of speech, especially when it comes in the form of artistic expression. The junior member of the coalition, the far-left United We Can (Unidas Podemos) party, has said it will work to grant a pardon to Hasél.

The riots have led to a new political storm, with the opposition lambasting United We Can for not expressing a strong condemnation of the street violence. Deputy Prime Minister Carmen Calvo, a member of the center-left Socialists leading the ruling coalition, criticized United We Can spokesman Pablo Echenique for showing support for the “antifascist protesters fighting for freedom of expression.”