Things have gone from bad to worse for Nigeria's gay community.
A young man convicted of sodomy was publicly whipped on Thursday, just days after the conservative African country outlawed gay marriage and same-sex partnerships.
More from GlobalPost: UN chief Ban fears Nigeria anti-gay law will fuel violence
Mubarak Ibrahim, an unemployed artisan, received 20 lashes after being convicted in a northern Nigeria sharia court.
Ibrahim narrowly escaped Nigeria's harsher punishment reserved for homosexual acts: being stoned to death.
The judge presiding over Ibrahim's case said he took into consideration that the acts in question occurred seven years ago, and Ibrahim had "stopped the practice."
According to a BBC reporter in the courtroom, a court official ordered Ibrahim to lie on a bench and whipped his back before a large crowd. Ibrahim screamed out in pain, but was able to walk afterward.
He was among 11 other Muslims and a Christian arrested in Nigeria last month, accused of belonging to a gay club.
More from GlobalPost: Nigeria outlaws same-sex marriages and civil unions
UN Secretary General Ban Ki-moon expressed deep concern Wednesday about the country's new law that criminalizes same-sex relationships. He fears it could fuel prejudice and violence and thwart an effective response to the HIV/AIDS epidemic.
The bill was passed by the national assembly last May and signed into law by President Goodluck Jonathan on Monday.
It sparked widespread condemnation from abroad — including Canada, the United States, Britain, the European Union and the United Nations.