Five men have appeared in court in the northern Nigerian state of Bauchi for allegedly forming a gay club, a court official said on Wednesday.

Abdul Mohammed, a clerk at the Bauchi state Upper Sharia (Islamic law) Court, said four of the men had pleaded guilty at a hearing on January 6, while the fifth denied the charge.

“They were arraigned by the Bauchi state Sharia Commission… following an allegation that they had formed a gay club and received $150,000 from the United States,” he said.

“The offence contravenes Section 133 of the Bauchi state Sharia penal code.”

Mohammed said the four men who pleaded guilty were aged 22, 24, 25 and 28 while the fifth, who denied the allegation, was a 47-year-old school principal.

All five were remanded in custody until the next hearing on January 23, he added.

The men were charged under Sharia law — which runs parallel to state and federal justice systems in the north — banning sodomy.

The offence carries the death penalty, although it is rarely, if ever, enforced.

Bauchi Sharia Commission chief Mustapha Baba Ilela said at least 12 people have been arrested on suspicion of breaking the law since the start of the year.

“All the accused were apprehended by the community, which is averse to homosexuality, and handed over to us,” he added.

“The suspects confessed to committing the act they are accused of without threat or inducement and we have the audio and written confessions.”

The case emerged after it was announced this week that Nigerian President Goodluck Jonathan had signed a bill into law against gay marriage and civil partnerships.

The Same Sex Marriage (Prohibition) Bill 2013 imposes penalties of up to 14 years’ imprisonment for anyone found to have entered into such a union.

Anyone who founds or supports gay groups or clubs also runs the risk of a maximum 10-year jail term.

The legislation, which effectively reinforces existing laws banning homosexuality in Nigeria, has been widely condemned abroad as draconian and against a raft of human rights conventions.