David Boyle writes: In these days of identity politics, it can seem problematic to have an ancestor who was gay. I mean, was he or wasn’t he? If he was, what was he doing having descendents? If not, what was he behaving like that for?

One of the problems with the way we see identity these days is that it accepts no grey scale. Either you are something or you’re not something: it bothers people when you slide in and out of their favourite definitions.

So when I published an account of the peculiar events leading up to the criminalisation of homosexuality, so suddenly and unexpectedly in the middle of a summer night in 1885 – and my own ancestor’s involvement in the scandal that led up to it – not everyone has been pleased.

One critic has posted no less than seven negative posts on Facebook, which implies to me that something else may be going on. Another one said simply: “All gay people have always known the story”.

Actually, I don’t think they have. Popular misconceptions suggest that the Criminal Law Amendment Act, which first criminalised all homosexual behaviour, had something to do with the prosecution of Oscar Wilde – it did, but ten years later.

Popular misconceptions suggest the law was changed by crusty old reactionaries like the Marquess of Queensberry, who brought down Wilde.  Actually, it was a a lone Liberal MP, responding to a campaign by the Irish Nationalists.

Popular misconceptions suggest that was a law brought in primarily to assuage rising homophobia.  In fact, it was a law primarily designed to raise the age of consent for girls.

But there are lessons to be learn from the emergence of a disastrously intolerant amendment, because its origins lay in the aftermath of a terrorist act, the Phoenix Park murders in 1882.

The murders shocked the public on both sides of the Irish Sea, and to claw back the moral high ground, Irish Nationalist MPs launched a campaign to identify homosexuals in the Irish government, or part of the establishment in Dublin – starting with the senior detective in charge of the Phoenix Park case, James Ellis French. The campaign led to huge torchlight processions and mass demonstrations, with bands, in many towns and cities of Ireland.

Most of the defendants were acquitted – the main issue at stake was whether it was physically possible to commit sodomy in a hansom cab – but by then my ancestor had fled arrest from Dublin.

The scandals barely ruffled feathers in London, except among campaigners linked to the Irish nationalist cause, or political friends of their parliamentary leader, Charles Stewart Parnell. Among these, the maverick radical Henry Labouchère, was particularly frustrated that sodomy had been so difficult to prove.

So when the opportunity arose the following summer, as the Criminal Law Amendment Act crawled through Parliament, Labouchère seized his chance. His amendment was debated in a few minutes and only one MP queried whether it was relevant to the debate. But for the next eight decades, it put men – it only applied to men – in a perilous position if they loved their own gender.

The law wasn’t repealed until 1967, and among those prosecuted were John Gielgud and Alan Turing. Turing committed suicide; so did hundreds and possibly thousands of others.

The Dublin Scandal is all but forgotten, and I also wanted to write the story of my great-great-grandfather, and his disastrous involvement, and his transformation from respectable banker and pillar of the Unionist community to a stained glass artist living on the edge of the law in London’s Denmark Hill. It is this that critics of my book Scandal seem to have objected to.

The story demonstrates to me the political dangers of scapegoating. For short-term advantage, Parnell and the Nationalists led a bitter homophobic campaign – the first of its kind in modern politics. The 1885 act remains on the statute book in India and many other parts of the former British empire.

It also implies that people don’t have to fit into neat categories, though we might find it convenient to do so. Until we learn those lessons, we won’t have entirely escaped the shadow of 1885.

David Boyle is the author of Scandal: How homosexuality became a crime.