Activists said the court's ruling in Yaounde, the capital, marked yet another setback for gays and lesbians in Cameroon, widely viewed as the most repressive country in Africa when it comes to prosecuting same-sex couples.
Jean-Claude Roger Mbede, 32, had been provisionally released on bail in July after serving a year and a half in prison. His lawyer has 10 days now to file an appeal to the country's Supreme Court.
Holding back tears, he said he wasn't sure whether he could withstand more jail time given the conditions he faced there.
"I am going back to the dismal conditions that got me critically ill before I was temporarily released for medical reasons," he told The Associated Press by telephone. "I am not sure I can put up with the anti-gay attacks and harassment I underwent at the hands of fellow inmates and prison authorities on account of my perceived and unproven sexual orientation. The justice system in this country is just so unfair."
Homosexuality is illegal in many African countries, and lawmakers in Liberia, Nigeria and Uganda have recently presented legislation that would strengthen anti-gay laws that are already on the books.
But even in those countries, prosecutions are rare or nonexistent, said Neela Ghoshal, a researcher in the LGBT Rights Program at Human Rights Watch.
Cameroon's penal code calls for sentences ranging from six months to five years for people found guilty of "sexual relations with a person of the same sex." And last year, 14 people were prosecuted for homosexuality and 12 were convicted, according to Justice Ministry records cited by Human Rights Watch.
"It's the country that arrests, prosecutes and convicts more people than any other country that we know of in Africa for consensual same-sex adult conduct," Ghoshal said.
"In most of these cases there is little or no evidence. Usually people are convicted on the basis of allegations or denunciations from people who have claimed to law enforcement officials that they are gay."
She said many suspects were tortured or otherwise treated poorly in custody until they gave confessions, which were then used as evidence against them.
In October, two men were convicted of homosexuality because of their "effeminate" appearance and because they were drinking Bailey's Irish Cream, which was viewed as a drink favored by gay men, according to a statement issued November 16 by the Office of the U.N. High Commissioner for Human Rights.
Andre Banks, executive director of All Out, said Mbede had already been significantly harmed by the case against him because of pervasive anti-gay stigma in Cameroon.
"Roger said he had to leave the university where he was studying because of the attention from the case and because of the mounting threats and fear of violence that have been very concerning to him," Banks said. "He's worried that he won't be able to have a normal life in Cameroon because of the amount of attention it's brought to him."
Lawyers defending those accused of homosexuality also have faced death threats including Mbede's attorney, Alice Nkom.
A text message sent in October to Yaounde-based lawyer Michel Togue, who has also defended people accused of homosexuality, similarly threatened his children. Attached to the message were photos of the children leaving school.