Spain’s highest court has issued an international arrest warrant for a rapper, who is believed to have fled the country to avoid a prison sentence imposed on him for lyrics that allegedly glorified terrorism and insulted the Spanish monarchy.

Josep Miquel Arenas, known by his artistic name, Valtonyc, from Mallorca was due to start a three-and-a-half year jail term on Thursday.

His whereabouts remain a mystery. According to national media reports, he has fled the country.

On his Twitter account on Wednesday Arenas wrote that: “Tomorrow they will knock down the door of my house to put me in jail…for some songs. Tomorrow Spain is going to make a fool of itself, once more. I’m not going to make it easy for them. Disobedience is legitimate and it’s an obligation when it comes to this fascist state.

“No one’s giving up here,” he said.

The 24-year-old appealed the sentence to the Supreme Court, arguing that he was protected by his right to freedom of expression.

But the court rejected his case, ruling that his lyrics provided sufficient grounds for a conviction.

In one of his songs, Valtonyc appears to threaten police officers in the Basque country in northern Spain. In another, he says: “the king has a rendezvous at the village square, with a noose around his neck.”

His mention of the Basque country refers to the decades-long campaign by ETA, the separatist group which claimed the lives of over 800 people in its campaign to carve out an independent state in the north of Spain and France for people with Basque identity.

Numerous other Spanish musicians, filmmakers, and journalists have fallen foul of the law for allegedly glorifying terrorism or humiliating its victims on social media.

In March, Amnesty International said the broad definition of terrorism under Spanish law had created a "chilling" environment in which people are increasingly afraid to express alternative views or even making controversial jokes.

Some legal experts counter this criticism arguing that free speech must also have limits.

It does “not (give) permission to say whatever one wants," Antonio Torres del Moral, a constitutional law specialist told Agence France Presse.