Nigerian security personnel were on Wednesday forced to fire guns into the air to disperse thousands of protesters who threw stones at a court containing men accused of being gay.

The demonstrators threw rocks at the Sharia court in Bauchi city, urging the conviction and execution of eleven men arrested for belonging to gay organisations.

After dispersing the crowd, the prisoners were returned safely to the prison, and Judge El-Yakubu Aliyu closed the court following the disruptions.

The judge said in response to calls for the men to be put to death: “No one can be sentenced to death until confirmed without a reasonable doubt”.

Only three out of the eleven accused had given testimony before the violence began.

Because of the disruptions, the defence counsel did not succeed in submitting an application for bail, and the remaining eight defendants were not able to give testimony.

The court has not confirmed when proceedings might continue.

A man in northern Nigeria last week received 20 lashes after the same court convicted him of breaking laws against same-sex activity.

Mubarak Ibrahim, 20, was among 12 Muslim men accused of violating their religion due to their alleged sexuality in recent weeks.

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.

Reports out of northern Nigeria suggest that Sharia law enforcers have been emboldened by the introduction of the law.

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.