AS RECENTLY as 1988, three-quarters of the British population thought gay relationships were always or mostly wrong. By 2012, the figure had reversed: only a quarter of people held that view.

The first part of Stephen Fry Out There (BBC2) sought out the places yet to benefit from that dramatic change of attitudes. It started oddly, with Fry attending a civil partnership and chatting to Elton John and David Furnish about their relationship. If the aim was to set up a contrast with what was to come, it was utterly unnecessary.

The documentary came to life in Uganda, where the government proposes not only to outlaw homosexuality but to criminalise anyone who fails to report gay friends. During a radio debate, Fry flicks through a local newspaper whose headlines seem to have been written by an adolescent bully. 'Top homos named' was one of the milder examples. The pastor defending the law then lectures Fry on the proper use of his penis.

It’s bizarre, knockabout stuff - almost comic, although we see that Fry is unsettled. But the consequences of all this schoolboy paranoia can be very dark indeed.

Fry speaks to a young lesbian who has been subjected to "corrective rape", intended to bring her back into the heterosexual fold. The attack left her pregnant and HIV-positive - and no more attracted to men.

Refreshingly, the programme puts on no pretence of impartiality. Fry barely conceals his contempt for the ironically titled Minister for Ethics and Integrity, who says the rape of schoolgirls is preferable to consensual same-sex love. "At least they’re doing it the right way," he says.

Fry knows that some will see his involvement as liberal, neo-colonial meddling, but he is unashamed. "He regards my views as an imposition on his country," he says of the minister, "and I suppose in a way he is right."

Earlier, Fry had watched footage of young Iranian men being hanged for the crime of sodomy. "If you let insults and words go by unchallenged," he had said, "if you don’t allow the dignity of homosexuals, it leads to this."

It had seemed a bold claim, but what we see in Uganda bears it out. The absurd newspaper headlines, the sex-obsessed pastors, the populist government ministers - they all contribute to a culture in which gay men and women are attacked with impunity.

Next week Fry is in Russia, where such policies reach their murderous conclusion.

Holden Frith, Editor of TheWeek.co.uk, will be writing regularly on new television and other digital media developments.