RABAT, Morocco — A Moroccan court sentenced a rapper known for his criticism of the country’s ties with Israel and government corruption to eight months in prison, the latest in a string of penalties against young musical artists.

Souhaib Qabli's songs sharply criticize Morocco's 2020 decision to normalize ties with Israel in an accord brokered by the first Trump administration. His lyrics also call out problems with public services and restrictions on freedom of speech, grievances also voiced by Morocco's Gen Z protesters last year.

The judge ruled Thursday that Souhaib Qabli, a 23-year-old rapper, was guilty of insulting a constitutional body, his attorney Mohamed Taifi told The Associated Press. Qabli, who is a member of Al Adl Wal Ihsane, a banned but tolerated Islamist association, was also fined $106.

“The court did not clarify what it meant by a constitutional body. No specific party was identified in the case file, and there are many constitutional institutions,” Taifi said.

Taifi said that his client is appealing the verdict. He also said Qabli was cleared of other charges, including insulting public officials and disseminating false allegations.

Before the public hearing, dozens of supporters gathered outside the court in Taza, a city in north-central Morocco about 162 miles (261 kilometers) from the capital Rabat, holding banners calling for Qabli’s release. Rights groups in the North African kingdom have described the case as a political measure aimed at curbing freedoms.

Qabli, known by the stage name L7assal, was arrested earlier this month and remained in custody until the court delivered its verdict. He was studying refrigeration and air conditioning at a vocational training institute in addition to his music career.

His attorney said that in court, Qabli was questioned about his songs and social media posts. Qabli said he had no intent to insult any constitutional body and was expressing his views through rap.

His songs include one titled "No to the Normalization," referring to Morocco's decision to normalize ties with Israel in the U.S.-brokered Abraham Accords in 2020, in exchange for Washington's recognition of Morocco's claim to the disputed Western Sahara territory.

The move was criticized by Morocco's vocal pro-Palestinian supporters and sparked large protests in several cities. While authorities allowed the rallies, they have arrested activists who criticized the decision.

Morocco’s constitution generally guarantees freedom of expression, and the country is seen as relatively moderate compared to others in the Middle East. Yet certain types of speech can still trigger criminal charges, and Morocco has seen tightening restrictions on dissent, including against journalists and activists.