Nine men in Senegal who were sentenced to eight years in prison for “indecent conduct and unnatural acts” have had their convictions overturned.

Dakar’s court of appeal ordered the arrest warrants against the men to be lifted and ruled they must be released immediately.

The men, most of whom belong to a group set up to combat HIV/AIDS, were arrested in December at the apartment of Diadji Diouf, a prolific LGBT leader, and sentenced in January.

The men’s counsel argued that there was no material proof for the accusations, no specific complainant had filed charges against the men and that the time of their arrests (after 10pm) was illegal.

The prosecution did not contest the defence plea.

Gay rights groups believe the eight-year sentence originally given to the men is the harshest ever handed down to anyone accused of gay crimes.

Homosexual acts are punishable by imprisonment of between one and five years in Senegal.

Last year, the African Assembly for the Defence of Human Rights expressed concern over the rise of homophobia and hatred of homosexuals in Senegal.

Muslim organisations in the African nation have warned against “enemies of the faith and of morality.”

In February 2008, the release from prison of several men arrested on suspicion of homosexuality following the publication of photographs of a same-sex “marriage ceremony” led to riots, acres of print and media coverage and a conspiracy theory. Some gay men were driven out of their homes.