A judge in Senegal on Friday handed down a six month jail sentence to two men for having consensual sex.

According to the AP, neighbors turned in the men to authorities.

The two acknowledged having consensual sex and were found guilty of violating Senegal's penal code that criminalizes “an improper or unnatural act with a person of the same sex.” Violators face up to five years in prison and fines of up to $3,000

Discrimination and violence against the LGBT community runs high in the majority of African countries, two-thirds of which prohibit gay sex.

Recent laws in Uganda and Nigeria that increase the penalties against gays have been widely protested in the West.

(Related: Gay “witch hunt” follows passage of Nigerian anti-gay law.)