The two were arrested after neighbors alerted police to their home in Grand Medine neighborhood of Dakar, the capital.
In court Friday the two men acknowledged having sex. Judge Racky Deme sentenced them under Senegal’s penal code that calls for prison sentences of up to five years and fines of up to $3,000 for committing “an improper or unnatural act with a person of the same sex.”
More than two-thirds of African countries outlaw consensual same-sex acts, and discrimination and violence against gays, lesbians and transgender people is common.
Senegalese President Macky Sall insists gays in the conservative, predominantly Muslim country are only prosecuted for breaking the law.