A Nigerian man has received 20 lashes after an Islamic court in the northern city of Bauchi convicted him of homosexual offences.
Under Islamic law, courts can punish homosexual acts by stoning to death.
But the judge said he took into account that the Muslim man, Mubarak Ibrahim, 20, carried out the acts seven years ago, and had stopped the practice.In Nigeria, homosexual acts are illegal under both Islamic and secular law and restrictions have been tightened.
Earlier this month, President Goodluck Jonathan signed into law a bill which bans same-sex marriages, gay groups and shows of same-sex public affection.
The new legislation applies throughout Nigeria.
Most states in the predominantly Muslim north of Nigeria have adopted Islamic law, known as Sharia, since the end of military rule in 1999.
Along with Mr Ibrahim, 11 other Muslims and a Christian man were arrested last month accused by the authorities of being homosexuals.
He was also ordered to pay a fine of about $30 (£18).
The BBC's Ishaq Khalid was in court when Mr Ibrahim was lashed with a whip, made of animal skin smeared with oil.
Mr Ibrahim, who had pleaded guilty to the charge, was ordered to lie on a bench, and an official whipped his back in front of a packed courtroom, our correspondent says.
Mr Ibrahim screamed in pain while being lashed, but was able to walk afterwards, he adds.
The trial of two other men was adjourned to 23 January.
The fate of the nine other men arrested on the same charge is unclear but on Wednesday the Sharia Commission in Bauchi said the Christian would be tried by a "conventional court", not an Islamic court.