A Moroccan court on Monday sentenced rapper Mohamed Mounir, known as Gnawi, to one year in jail for insulting police on social media, in what Amnesty condemned as "a disgraceful verdict".
A defence lawyer said he believed his 31-year-old client was prosecuted because of a song he co-wrote about the hardships of young people in Morocco, unemployment and corruption.
The song "Aach al Chaab" -- which means long live the people -- has been viewed more than 15 million times on YouTube since it was released last month.
The lyrics denounce injustice and money-grabbing and attack Morocco's king directly, which according to local media constitutes a clear breach of the kingdom's "red lines".
However, the court in Sale near the capital Rabat sentenced Gnawi to one year in jail and fined him 1,000 dirhams ($103) for "insulting a public servant", a reference to the police.
Gnawi, who was arrested November 1, said he had insulted the police in a video which he posted on his Instagram account because he had been "humiliated" by them.
"I am an artist. My job is to defend my rights and the rights of the people. It was not the first time that I had been humiliated by the police," Gnawi told the court.
"Since I was born, I have been humiliated," he said.
Outside the courtroom, Gnawi's relatives chanted "long live the people".
"This is a disgraceful verdict. There can be no justification for imprisoning the Moroccan rapper Gnawi for a year simply because he exercised his right to freedom of expression," Amnesty International said.
"International law protects the right to freedom of expression - even when the opinions shared are shocking or offensive," said Amnesty's Middle East director Heba Morayef.
"This verdict... indicates that those who dare to openly criticise the authorities will face punishment," Morayef said in a statement.
The case has also sparked outrage on social media, but Mustapha Ramid, Morocco's minister of state in charge of human rights, told parliament that "Aach al Chaab" was "provocative" and "repugnant", according to media reports.
Young people make up a third of Morocco's 35 million inhabitants. A quarter of those aged between 15 and 24 are unemployed and out of school, according to official figures.
(Except for the headline, this story has not been edited by NDTV staff and is published from a syndicated feed.)
Anand Mahindra's Big Shoutout To Rapper Sooraj Cherukat: ''Extraordinary, Raw Videos'' 21 Killed In Morocco Amid Scorching Heatwave In Last 24 Hours Argentina Snatch Morocco Draw, Spain Win Olympic Men's Football Opener How Extreme Weather Is Leading To Rise In Child Marriages In Pakistan 3 Days After Big Order On Deposits With SBI And PNB, Karnataka Hits Pause Monkeypox Cases Rising: How Worried Should You Be - 10 Points PM's De-Escalation Message In Call With Netanyahu Amid West Asia Tension Man Scales Wall, Jumps Inside Parliament Annexe Premises, Arrested: Report "Too Many Dead": Gaza Undertakers Stacking "Graves On Top Of Graves" Track Latest News Live on NDTV.com and get news updates from India and around the world.