Men accused of trafficking obscene materials after pictures taken from pilfered computer are published in newspaper

A gay British man and his Ugandan partner are facing possible jail terms after images of them having sex were published in one of the east African country's newspapers.

Bernard Randall, 65, originally from Faversham in Kent, faces a charge of trafficking obscene material which could carry a two-year prison sentence.

His partner, 30-year-old Albert Cheptoyek, faces a more serious charge of gross indecency which could see him put behind bars for up to seven years. Both men are due in court to answer bail on Monday.

Randall says the stills of him having sex appeared in a tabloid following the theft of a laptop containing private videos from the apartment where he was staying on holiday.

The public exposure has raised fears for his safety. In 2010 a Ugandan paper published the names of 100 homosexuals under the headline: "Hang Them." Months later a prominent gay rights activist was bludgeoned to death at his home.

Randall has taken precautions such as securing the locks on his doors and padlocking his windows. An online petition calling for his release says he is "scared out of his mind and at the mercy of mob rule and vigilantism".

The former analyst with HSBC and Credit Suisse said he was blackmailed over the images before being detained and held in cells for three days in dire conditions then charged.

Speaking from Uganda, he told the Press Association: "The charges are nonsensical. The publication of the pictures was as a consequence of the theft of my laptop. I wasn't publishing them. They were very private videos of my private life that got stolen."

Asked about his reaction to being charged, he replied: "I was devastated. The worst thing was being taken away from our home at 6.30am and thrown into cells where we spent three nights and three whole days until we were charged.

"There was just a concrete floor, no blankets and no pillows. There were quite a lot of people, 18 other criminals in there. They had seen the newspaper in the cell so they all were aware of the situation."

Randall said he had initially been facing the more serious charge of being involved in an "unnatural act" but that he now only faces a charge relating to the video taken from his computer.

Uganda has one of the most homophobic climates in Africa including draconian laws. Homosexuality is punishable by up to 14 years in jail and MPs are proposing to extend the penalty to life imprisonment. Gay rights activists say they regularly face death threats.

Friends of Randall are campaigning to get him back to Britain and his case has drawn support from the gay rights campaigner Peter Tatchell and Stephen Fry, who tweeted: "We want our friend home. Please help to stop his persecution in Uganda."

Tatchell told BBC South East Today: "The consequences of the tabloid exposure of those gay people in Uganda is that many of them have been victims of violent assaults, they have had attacks on their homes and many have been forced out of their jobs.

This is a really, really shocking attack on gay human rights in Uganda and the Ugandan government is sitting back and allowing it to happen."

Nick Fabbri, a friend of Randall, told the same programme: "Talking to Bernard, there is a level of vigilantism that exists in Uganda against gays. I wouldn't want to be in his position and we all feel terribly for him."

Randall, who has two adult daughters, first came to Uganda in 2011 after his wife died just short of their 40th wedding anniversary. He only came out as a gay after his wife's death.

A Foreignand Commonwealth Office spokesman in London said: "We are aware of the arrest of a British national on 19 October in Uganda and are providing consular assistance."

In January Uganda dropped charges against British theatre producer David Cecil and deported him instead. He had been arrested after being accused of staging a play about gay people in the country without proper authorisation.