The British theatre producer who was deported from Uganda after staging a play about a gay character has spoken of how he was made to stay in a jail cell with murderers and rapists, without being given the chance to say goodbye to his children.

David Cecil appeared in court last September charged with ‘‘disobeying lawful orders’’ of the Uganda Media Council in regards to his play, ‘The River and the Mountain,’ which had been performed without the approval of the council.

The plot of the play had revolved around a gay businessman who is murdered by his employees. Mr Cecil said that the idea was conceived by five native Ugandans, but as the producer he was held accountable for its staging.

The case against him was thrown out by a court at the start of 2013.

However, Mr Cecil was detained by police late last month, and deported last week. He has said he will appeal against the deportation.

Mr Cecil spoke to the Evening Standard about how he came to be taken from the country that had been his home since 2003, where he had been living in the suburbs of the Ugandan capital Kampala with his girlfriend Florence Kebirungi and their two children, Solomon and Elena.

“These guys were very menacing when they came to arrest me,” he said. “I did not know if they were hitmen, secret service or what. I was taken to a prison and put in a tiny holding cell with Ugandan criminals, some of them murderers and rapists.

“There were 42 of us in two rooms, four metres by four metres, it was pretty horrendous. There was one meal of maize and boiled beans a day. It was an awful experience. The authorities did not tell me anything and I was not even allowed to see my children before I was deported days later. I had no time to pack anything — not even a toothbrush.”

He said: “They were always planning to deport me on the grounds that I am an undesirable. I plan to argue that I am not and am going to fight this in the high court. They have had the attitude of ‘off with his head’. I want to get back to my children.

“My situation is ridiculous — I just staged a play with a homosexual character — that does not make me ‘undesirable’ and I will fight this crazy decision. I am not even a gay rights activist.”

He denied that the majority of Ugandans were homophobic, in a stark contrast to the claims of lawmakers who say that an upcoming anti-homosexuality bill will be a “gift” to the Ugandan population. The bill is currently the third item on the Ugandan Parliament’s agenda of upcoming business.

“Uganda is not a terrible place and most people are not homophobic but they are conservative,” said Mr Cecil. “There are pastors preaching hate, they are the problem.”