Ala Yaacoub, better known by his rap name "Weld El 15", was being retried at the same court in a Tunis suburb that had convicted him in absentia in March, after he handed himself him in to face justice.
As the judge read out the verdict, shouts of protest erupted in the court room from his supporters who were swiftly expelled by police, with some of them beaten outside the building.
The musician had been given a two-year jail sentence in March for posting a rap video called "The Police are Dogs" on the Internet.
Before the trial opened today, Yaacoub had said he was afraid and criticised the authorities for not respecting freedom of speech.
More From This Section
"I am afraid because in a country like Tunisia the law is not applied; you can expect anything," he told AFP.
"In the song, I used the same terms that the police used to speak about the youth. The police have to respect citizens if they want to be respected," Yaacoub added.
Ahead of the original trial in March, in which four others were handed prison sentences but later released, the interior ministry said the song's lyrics were "unethical, abusive and threatening" towards pubic officials.