A case against UK theatre producer David Cecil, who was charged with breaking Uganda’s laws in relation to his play featuring a gay storyline, has been thrown out by a court.

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 summer.

Mr Cecil appeared in court during September charged with ‘‘disobeying lawful orders’’ of the Uganda Media Council. The play, ‘The River and the Mountain,’ was performed without the approval of the council.

On Wednesday, Mr Cecil told the BBC the case was dismissed either because of a “lack of will or a lack of evidence” to try him.

“Today’s [Wednesday's] outcome demonstrates there is a functioning judiciary in Uganda and it has restored my faith in Ugandan society,” Mr Cecil said.

If convicted he could have faced two years in jail.

Uganda is considering legislation aimed at increasing penalties for homosexual acts – which are already illegal in the country.

Although MPs broke up in 2012 without debating the measure, the bill, which threatens to impose the death penalty for those convicted of breaking the proposed law, could still be introduced in parliament in 2013.