A Moroccan court on Friday convicted a rapper of attacking the image of the security services in a song about police corruption and sentenced him to a year in prison.

Rapper Mouad Belghouat, who goes by the name El-Haqed, or "the enraged," was convicted without the possibility of making a final statement. He was kept in prison and his defense team wasn't present. Defense lawyers said they would appeal the verdict.

The defense team had withdrawn on Monday after an altercation between a group supporting the rapper and a lawyer for the Moroccan police, but lawyers said they had expected to be able to make closing arguments on behalf of their client. When attorney Said Bouzerda arrived, it was already too late. Deliberations had begun and the court refused to allow him to make a final statement, he said.

The rapper writes songs about corruption and social injustice and is involved in a pro-democracy movement in the Moroccan kingdom. He was arrested March 29 and charged with insulting state employees and official institutions, accused by police of posting a song on the Internet with photos insulting to police, with one showing an officer with a donkey's head.

The defense claims the photos were posted by an anonymous person and the case is a political attack on a well-known activist.

"This is scandalous. They think they will silence our voices with this type of sentence," said Fatna Bik, a militant and member of the Moroccan Association for Human Rights.

It was the second conviction for Belghouat who comes from a sprawling Casablanca slum. Belghouat was jailed for four months last year for getting into a fight with a regime supporter in the gritty, low-income suburb of Casablanca where he now lives. His supporters say the charges were trumped up. He was released Jan. 12 in a case that mobilized the country's activist community.

The song he was charged for in his second tangle with authorities is called "Dogs of the State" and is addressed to the police.

"You are paid to protect the citizens, not to steal their money," goes the song. "Did your commander order you to take money from the poor?" The song asks the police to arrest the wealthy businessmen who he says have divided the country up for themselves.

Morocco was swept with pro-democracy demonstrations like many other countries in the Middle East last year, but King Mohamed VI managed to defuse popular anger with a series of reforms.