Bernard Randall, a Briton in Uganda facing charges over gay sex images published in a newspaper, is to be deported back to the UK amid global criticism of his prosecution.
The 65-year-old, and his Ugandan partner Albert Cheptoyek, 30, had a trial date set in Entebbe for December 4 earlier this month.
The retired banking computer analyst believes the latest move has come in a bid by Ugandan authorities to stop the international community from seeing the country as anti-homosexual.
The couple were charged after intimate images of Mr Randall appeared in a Ugandan newspaper following the theft of his laptop during a break-in at his holiday home.
But amid fierce global criticism over their prosecution, it has emerged the Ugandan authorities have now refused Mr Randall an extension to his visa, and he faces deportation back to the UK, possibly next week, he said.
Retired banking computer analyst Mr Randall, originally from Faversham, Kent, believes the visa issue has been used by the Ugandan authorities "at the highest level" to avoid them being seen as anti-homosexual.
He said: "The policeman ... said that my application for the visa extension had been refused and that the passport would be sent to the airport to await my departure, which is currently scheduled for Friday December 6, and that I was an illegal alien as I was still in the country after the expiry of my visa."
Mr Randall has denied trafficking obscene material, which carries a two-year jail term. His partner faces a more serious charge of gross indecency, which carries a seven-year jail term.
Mr Randall added: "I want the charges to be formally dropped, and I want to be able to come back to the country, but at the same time I also want to go home to see my family."
He said it was unclear whether his trial will go ahead next week and that the case surrounding his partner remained equally unclear.
Jane Okuo Kajuga, a spokeswoman for Uganda's directorate of public prosecutions, has previously said the charge against Mr Randall has nothing to do with his sexual orientation.
But the couple's supporters say their cases are the latest examples of state-sponsored harassment of gay, lesbian, bisexual and transgender people in Uganda.
In the wake of Mr Randall's prosecution, protests were held in London against what human rights campaigners have called "homophobic witch-hunts and show trials" in Uganda.
The east African country has some of the harshest laws governing homosexuality on the continent, which have been the subject of diplomatic protests from other countries.
Homosexuality is punishable by up to 14 years in jail but the country's politicians are proposing to extend this to life imprisonment.
Friends of Mr Randall have been campaigning to get him back to the UK, and his case has drawn support from comedian Stephen Fry and human rights campaigner Peter Tatchell.