Vague bans on glorification of terrorism and insulting the monarchy have ensnared a growing number of artists and social media users.

The Borbons Are Thieves” is the new hit among the rap community in Spain. The song, which refers to the country’s monarchy, was released on April 9 by 13 of the genre’s most prominent artists to express support for several others who have recently faced harsh criminal penalties for insulting the royal family, denouncing political corruption, or “glorifying terrorism.”

The protest recording was inspired in part by a jail sentence against Valtonyc, a 24-year-old rapper, for aggressive lines such as “we want death for these pigs” and “we’ll get to the nut of your neck, you bastard” in reference to politicians and members of the royal family, some of whom have been implicated in corruption. The performer was ordered to spend three and a half years in prison for “glorification of terrorism,” slander, lèse-majesté, and threats. His sentence was upheld by Spain’s Supreme Court in February.

Many Spaniards and other observers would likely take offense at Valtonyc’s lyrics, or at least find them difficult to defend as either art or political commentary. But his case forms part of a larger pattern in which critical or satirical speech has been punished under expansive criminal and antiterrorism laws in Spain, threatening freedom of expression in a major European democracy.

In another recent case, Cassandra Vera, a 22-year-old student, was punished in 2017 for joking on Twitter about the 1973 assassination of Luis Carrero Blanco, a prime minister…