A Tunisian court sentenced six students to three years in jail each on charges of homosexuality in a judgement condemned by rights activists, their lawyer said on Monday.
The court in Kairouan last week handed down the maximum term under a controversial article of the criminal code that criminalises sex between two males, Boutheina Karkni said.
The six were also banned from the central city for five years from when they finish their time in jail, she said.
The young men were detained in November and December after "neighbours denounced them" and were made to undergo anal exams, she said.
Karkni described the ruling as "extremely harsh" and said an appeal hearing should take place "in two to three weeks" in the nearby coastal city of Sousse.
One of the defendants was handed an extra six months behind bars for "offensive" videos found on his computer, the huffpostmaghreb.com news site reported.
Local rights group Shams, which calls for decriminalising homosexuality in Tunisia by revising Article 230 of the penal code, condemned the judgement.
But interior ministry spokesman Walid Louguini defended the ruling.
"Our job is to uphold the law," radio station Shems FM reported him as saying.
In September a Tunisian court sentenced a student to a year behind bars in Sousse on charges of homosexuality, also after an anal exam.
He was released in November pending an appeal hearing expected on Thursday.