MUCH has been made this summer of the 50th anniversary of the Sexual Offences Act, which began to partially decriminalise same-sex relationships. Those caveats are important of course: the Act didn’t apply in Scotland, Northern Ireland, or indeed to a great many people beyond a precisely defined exemption from prosecution. It did nothing proactive to tackle prejudice and discrimination; it related to criminal offences between men only, failing to acknowledge the experience of women; and in leaving key criminal offences on the statute book it probably resulted in a more aggressive approach by police and prosecutors in the subsequent years. Even those advocating the Act were at pains to reject the view that any principle of equality was involved — this was simply about drawing a line between the criminal law and the idea of moral sin, as they saw it.

But it must absolutely be recognised that this legislation was a vital step that made others possible. If it had failed, there is little chance that we would have seen later changes in the law regarding discrimination at work, the age of consent, family law, or indeed the development of equality policies in public services. As more people felt able to come out — something which these days is often seen only in personal and emotional terms, but which has always been a political act as well — the ignorance which underpins prejudice has been eroded year after year.

It took till 1980 for this partial decriminalisation to reach Scotland, and two more years till Northern Ireland followed suit. And even after that, many politicians still happily fanned the flames of hatred whenever they saw opportunities for themselves. While promoting Section 28, Margaret Thatcher was cheered at her party conference for condemning the idea that young people might be taught that they had a “right to be gay”. The odious speeches made against an equal age of consent, against anti-discrimination law, against civil partnership and then equal marriage, and now those against reform of gender recognition law have shown that while progress has been made, victory against prejudice has not been won.

This week David Davies, one of the Tory party’s hard right backbench MPs, has chosen to follow the line of argument taken by many Republicans in the US promoting so-called “Bathroom Bills” — laws to ban transgender people from using public toilets according their gender identity.

The idea that the law should forbid a trans woman from using a women’s toilet, or a trans man from using a men’s toilet, will have the effect of whipping up ignorance, suspicion and prejudice against trans people and to deny their very right to be who they are.

He’s not alone of course, as the sporadic twitterstorms about “Rev” Stuart Campbell’s views have made clear. The number of people happy to defend his misgendering of trans people has been dismaying. In a similar vein, many of the same people have leapt to Campbell’s support in his defamation claim against Kezia Dugdale, who challenged his use of David Mundell’s sexuality to criticise his son. No doubt both Mundells deserve criticism on many grounds, but not on this one.

So as we celebrate the progress that’s been made over the last 50 years (or at least as most of us do so) we need to keep some sobering thoughts in mind. At every step of the way, there have been those who fought against us. Even as they lose individual battles, they have not given up on the war.

The equality cause itself has often failed to see its own diversity, and to address the relative privilege amongst us. And many who are nominally on the side of progress are quite willing to put equality aside if they see it conflicting with things that matter more to them, from political self-interest to the comradeship they feel with those who support other causes, from religious identity to the independence movement.

It’s often argued that in a diverse society there should be no hierarchy of rights. Yet the rights and dignity of lesbian, gay, bisexual and transgender people, and those less recognised such as intersex and non-binary people, are still treated as optional by most political parties. Given special status as “matters of conscience”, those who oppose our legal equality, the public services we need, and even the very existence of our identities, are given a free pass. We should have less patience for this. We should expect political parties, employers, newspaper editors and everyone else to have zero tolerance for prejudice and discrimination against us, just as we must demand in relation to other forms of hatred like misogyny and racism.