Two Islamic courts in northern Nigeria have secretly released on bail seven men on trial for allegedly breaking anti-gay laws, officials say.

The seven were among a dozen men charged in the state of Bauchi earlier this year.

Four others were convicted on 6 March, fined 20,000 naira (£73) each and given 15 lashes with a horse whip as what the judge termed a discretionary “correctional punishment”.

A Christian suspect is having his case heard before a secular court.

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.

In January, a man received 20 lashes after an Islamic court in the northern city of Bauchi convicted him of breaking laws against same-sex activity.

The trial of several men had to be halted in the same month after a violent mob began throwing stones at the defendants.

AFP reports on Friday an official at Bauchi central prison, who asked not to be named because he was not authorised to speak on the issue, said the remaining seven men were no longer in custody.

“The courts wrote to us on 11 March confirming the suspects have been granted bail and we promptly released them,” he said.

A clerk at the upper sharia court in the Unguwar Jaki district of Bauchi, which is hearing one of the cases, confirmed the release of three of the men.

“The court granted bail to the three remaining suspects at the last trial session on 11 March, pending the determination of their cases,” said Abdul Mohammed.

“The judge’s decision to grant them bail was borne out of the fact that none of the accused was caught in the act, which is an indispensable condition to warrant the death sentence.

“That means they would not get the death penalty at the end.”

The other four men are on trial at Tudun Alkali upper sharia court, also in Bauchi.

Nigeria strengthened laws against same-sex sexual activity in January by banning same-sex marriages, gay groups and shows of same-sex public affection.