A Moroccan rapper who co-authored a song criticising the kingdom faces two years in prison after appearing in court Thursday charged with offending public officials.
Mohamed Mounir, widely known as Gnawi, was charged in Sale near Rabat over the publication of a video in which he insulted police.
But the lawyer for the 31-year-old singer said the real reason for his client's prosecution was the song he co-wrote with two friends about desperate youth in Morocco, unemployment and corruption.
The song "Aach al chaab" -- which means long live the people -- has been viewed more than 13 million times on YouTube since it was released last month.
The lyrics denounce injustice and money-grabbing and crucially attack Morocco's king directly, which according to local media constitutes a clear breach of the kingdom's "red lines".
The rapper's arrest on November 1, a day after the song's release, "has nothing to do with the song", a spokesman for Moroccan police told AFP.
The police sued as it "suffered damage as an institution", according to lawyer Abdelfettah Yatribi.
The rapper has been remanded in custody.
The case has sparked condemnation from rights groups and outrage on social media.
Amnesty International called his arrest "absurd" and an "outrageous assault on free speech".
"He is blatantly being punished for expressing his critical views of the police and the authorities," said Amnesty's regional director Heba Morayef.
"No one should face punishment for freely speaking their minds," she added.
Following a brief hearing, the case was adjourned until November 25. Judges will need to rule before then on an application to release the rapper filed by his lawyer.
Young people make up a third of Morocco's 35 million inhabitants. A quarter of those aged 15 to 24 are unemployed and out of school, according to official figures.