Ahead of the opening of his trial in Uganda, a British gay man has maintained he is innocent.

Bernard Randall, a retired 65-year-old former computer analyst from Faversham, and his Ugandan partner, 30-year-old Albert Cheptoyek, were arrested in their Ugandan home following the publication of images of the couple having sex.

The government has charged Randall with “trafficking obscene materials” and Cheptoyek with “acts of gross indecency.” Each faces up to 2 and 7 years in prison, respectively.

Randall told the UK's The Independent that the photos landed in the hands of the tabloid newspaper that published them after his laptop was stolen. He called the charges “nonsensical.”

The couple was dragged from their home at 6:30 in the morning and kept in cells with 18 other criminals for 3 days before they were charged.

Randall maintained his innocence in an interview with the AFP.

“I'm completely innocent,” Randall said from his front porch, “but I have no faith in the Ugandan judicial system.“

“I have the worst fears I'll be deported. So I won't be able to come back. So that shatters my dreams. Even worse really is actually going into prison. 'Cause it was bad enough being in the cells in the police station. Being in prison, well that horrifies me; the thought of that.”

Uganda is notorious for its harsh anti-gay laws. In 2009, an Ugandan lawmaker introduced a bill that proposed the death penalty for people who engage in gay sex. The Anti-Homosexuality Bill, which has yet to become law, has attracted worldwide condemnation and protests.