TO THE 935 pupils at St Herman Nkoni primary school, on the Masaka-Mbarara road, the slight, bookish-looking, soft-voiced man with the thick-lensed glasses was a pretty good head teacher. But to Uganda's tabloid magazines, such as Red Pepper and Rolling Stone, he was a monster: a “bum-driller”, ever seeking “shaftmates” for “romping sessions”. To the sponsors of Uganda's anti-homosexuality bill of 2009, which required witnesses to report homosexual activity within 24 hours, and which proposed the death sentence for repeat offending, he was a deviant and a corrupter of innocent boys. In the sermons of the evangelical Christian pastors who toured round Uganda's towns, he was a dog, a pig, possessed by devils. Even the Anglican priest who conducted his funeral broke off to shout that he was worse than a beast, because animals at least knew the difference between a male and a female.

David Kato was one of a group so tiny, hated and hounded—indeed, illegal—that most Ugandans had never knowingly met one. Gays like him called themselves kuchus, meaning “same”, as in “same-sex”. He was not the same in any way ordinary Ugandans cared to recognise.

His neighbours in Nansana and Mukono, the districts near Kampala where he lived at various times, admitted that he could be generous and kind. He paid for electricity wires to be put up locally, settled people's hospital bills, took drifters in when they were homeless. But this, they told the tabloids, was because he was “filthy loaded” with foreign dime, most of it donated to him for spreading a Western evil in Uganda, and a lot of the money was used as bribes for sexual favours. It was dangerous to get too close to him, because of his love for bums. His cleaning woman (who observed which young men came and went, and who stayed the night) noticed that he was tired on the day he was killed, and put it down to AIDS. A doctor took the false story on: Mr Kato was HIV-positive, and spreading it around, despite the government's campaign to keep AIDS in check. An ex-homosexual called Paul Kagaba claimed that he had been irreparably seduced into evil in Mr Kato's white house with the columns along Villa Road, after a couple of Guinnesses and a takeaway meal. He implied he was one of many.

In Mr Kato's mind there were only two ways to deal with being gay in Uganda. The first was to hide, to seek the dark. This was how he had first encountered the gay scene in Kampala in the late 1990s, after hearing rumours of a night party in some gardens outside the city and deciding he had to gatecrash. The party hosts, suspicious of his eagerness, gave him the wrong address; they did not want him to find this secret, illegal gathering among the trees. When he gave interviews to Western media it was often in dark alleys or deserted bars, face shadowy and close to the camera, or on some red-dirt road out of town, while he kept nervously walking.

Fighting talk

The second way of being gay, however, was to be out and proud. This was what he preferred, despite the risks. In 1998, just back from a few years of teaching in South Africa—where he had seen apartheid fall, and the old anti-sodomy laws with it, and had decided at last to admit his homosexuality—he held a televised press conference to start the push for gay rights in his own country. The police beat him up afterwards, the first of several beatings (he would show the scars on his head, where bottles had been broken on him), and arrested him, the first of three arrests. Not deterred, in 2004 he co-founded Sexual Minorities Uganda to campaign against the anti-homosexuality bill and general prejudice. He was the group's litigation officer, partly because he knew his way round the mazes of the law, but mostly because he was loud, impatient, demanding, angry (too much so, when the beer got to him), and didn't care that his face was now “Gay Uganda” for the tabloids.

When, last October, Rolling Stone ran a front-page article on “homos” recruiting in the schools, promising to expose 100 of them and calling for them to be hanged, Mr Kato was one of three who sued the magazine. He was the only one who went to court to state his case that homosexuals were born, not made, and therefore could not be recruited. He had known he was different as a child growing up in Nakawala, his ancestral village; his twin brother, John, had noticed it too, and simply laughed when, after years, he came out to him.

The new year looked propitious. On January 3rd a judge ruled against Rolling Stone; Mr Kato received compensation of 1.5m Ugandan shillings, or $640. It was not much, but it was the principle that mattered. Meanwhile, debate was suspended on the anti-homosexuality bill, partly as a result of world pressure that he had helped to stir.

Young men continued to mill around his house. One of them was a thief well known in the area: a rough part of town, with 15 iron-bar attacks in two months. Police assumed that when Mr Kato was bludgeoned to death with a hammer, on the afternoon of January 26th, he was just another victim in the series. Gay groups blamed the tabloids for incitement. Neighbours, hanging about, noticed with surprise that his blood on the walls looked much the same as theirs.