DOUALA, Cameroon (AP) — A court has overturned the conviction of two men who were sentenced for five years in prison for "looking gay" and ordering Bailey's Irish Cream.

The Court of Appeals Monday acquitted the men and ordered their release. The two men had already spent more than a year in jail where they were subjected to abuse from guards and other prisoners, according to human rights advocates.

The new ruling has been hailed by human rights lawyers and gay rights advocates who urged President Paul Biya to release all other prisoners found guilty under the country's harsh anti-gay laws.

On December 17, a Cameroonian court upheld the five-year-sentence of another man, Roger Jean-Claude Mbede, who was convicted of sending a text message that said "I love you" to another man.