British theatre producer David Cecil has been released on bail in Uganda, where he was charged over a play featuring a gay storyline.

The play – the main character of which is a gay businessman killed by his own employees – was performed at two theatres in the Ugandan capital, Kampala, last month.

According to the BBC, Mr Cecil was freed on bail of 500,000 shillings ($200; £124).

He appeared in court last Thursday charged with ‘‘disobeying lawful orders’’ of the Uganda Media Council.

Uganda’s Daily Monitor newspaper reports that the Media Council had warned the play’s backers not to perform it until it had been approved.

Ibin Ssenkumbi, a spokesman for the Kampala police, told AFP last week: “There are two charges preferred against him, one of disobeying lawful orders contrary to the penal code and another of staging the play which was still under review”.

Mr Cecil faces two years in jail if convicted.

The British Foreign and Commonwealth Office said they are providing consular assistance to Mr Cecil – his passport has been confiscated.

In August, the online protest group, Anonymous, hacked into two of the Ugandan government’s websites in protest at the country’s draconian homophobic laws.