A man in northern Nigeria has received 20 lashes after a Sharia court convicted him of breaking laws against same-sex activity.

Mubarak Ibrahim, 20, is among 11 Muslim men accused of violating their religion due to their alleged sexuality.

The trials are taking place in the country’s northern state of Bauchi.

Jibrin Danlami Hassan, the commissioner of Bauchi state’s Sharia Commission, said the men were arrested by residents of Bauchi city.

The BBC reports that a court in Bauchi city said it took into account that the defendant, arrested last month, committed the offence seven years ago, and claimed he was no longer involved in same-sex activity.

Along with 20 lashes, he was also ordered to pay a fine of around £18.

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.

He screamed in pain while being lashed, but was able to walk afterwards

The trial of two other men was adjourned until 23 January.

Predominantly Muslim states in Nigeria introduced Sharia law, a legal system based on Islamic theory and philosophy of justice, in 2000.

It sanctions severe physical penalties for violating its code.

There has been worldwide condemnation of Nigeria after the country’s President, Goodluck Jonathan, signed into law a draconian anti-gay bill.

Anyone who enters into a same-sex marriage or civil union may be jailed for up to 14 years. The law also bans people who register, operate or participate in gay clubs, societies or organisations, or who publicly show that they are in a same-sex relationship.

UN Secretary General Ban Ki-Moon, US Secretary of State John Kerry and UK Foreign Secretary William Hague have all criticised President Jonathan’s decision.

Same-sex relationships were already illegal in the country prior to the new law passing.