A TIDE of illiberalism has swept the western world over recent years and Scotland, just like the rest of the UK, is far from immune. In America today we see a woman’s right to control her own body, to have access to abortion, in peril of being swept away. In Hungary, equality is dead. In France, the far-right sharpens its knives.

The progress we made in the West from the late 1990s is now under threat as angry authoritarianism rises. Scotland is at risk of sliding back into bigotry, backwardness and bitterness.

The recent moral panic surrounding sex education should make it clear to anyone in doubt that the liberal gains achieved over the last 20 years aren’t inviolable and can be rolled back. A cabal of voices – including some Conservatives and members of the Alba Party - whipped up the kind of confected outrage that’s not been seen since the days of Mary Whitehouse.

Some facts first, because so many lies have been told already: the Scottish Government has produced a health and well-being census for schools. Pupils aged 14 and over will be asked frank questions about their sexual experiences.

There’s also questions about alcohol and smoking for pupils over 12, gambling for those over 13, and questions about drugs for those over 14. Parents can opt children out, and pupils can opt out themselves. Data gathered is confidential and anonymity preserved. However, if any red flags are noticed – evidence that a child is being sexually abused or at risk of other harms – then action can be taken to help the child concerned.

Read more: Forget the phoney culture war, Nicola Sturgeon is firmly in control

Such panic has been contrived, amid calls for a boycott, that eight of Scotland’s councils won’t take part.

Let’s put a few things into perspective. I, along with, one imagines, millions of other people, thought this kind of pearl-clutching moral majority nonsense was long dead for one reason: pupils need safe sex education.

If, like me, you grew up in the 1970s and 80s, you’ll recall no informative sex education. Teenagers – if any of us have the intelligence to look back at our own lives – experiment sexually and take risks. If teenagers are beginning to experiment with sex, yet given no accurate, honest and frank information about sex, then we’re putting them at dire risk.

We aren’t just opening the door to increasing unwanted teenage pregnancies and sexually transmitted diseases, we’re also leaving children vulnerable to predators and abuse, and to the influence of brutal misogynistic online pornography, which saturates society.

It should come as no surprise that among the voices protesting about sex education are those who’d limit or remove the right to abortion for women. What absolute wickedness these people – often posing as god-fearing Christians – would inflict on our young. They’d remove access to information which would help teenagers safely navigate the world of sex, yet put them in the position of having to deal with unwanted pregnancies or STDs. A decent god would curse them.

This survey is being conducted to improve the lives of children, to create better, safer child-centred policies. Those opposed to it are also clearly playing dark political games. Although many are deeply authoritarian and controlling in their outlook, they’re also trying to create any phoney scandal which would wound the SNP and Nicola Sturgeon. As someone who hammers home their criticism of the SNP and the First Minister every week in these pages, I find it deeply sinister that children and their safety and education should be weaponised to score points against the Scottish Government.

Nor has the media in Scotland done itself any great favours with its coverage of this issue: front-loading reporting with hysteria and fear-mongering rather than coolly objective analysis.

Many of the voices trying to weaponise the safety and education of Scottish children are those who’d want to roll back rights not just for women but for minorities too.

As the tide of illiberalism swept the West, trans people found themselves right on the frontline. In Scotland and the rest of the UK, powerful voices across the political spectrum have taken this tiny, weak and marginalised group of people and subjected them to campaigns of ruthless harassment and hate. Their voices are silenced, and when they go on the attack to defend themselves – and often go too far, just as those who hound them go too far – they’re labelled abusers, while those who abuse them create false narratives of victimhood around themselves.

The former equalities convenor of the SNP has offered a glimpse of the rank bigotry within her party. Fiona Robertson says a “significant number of people who had been considering candidacy for local government have decided not to proceed, as being a woman, disabled, Bame or LGBTQ+ without the backup of a robust disciplinary procedure to deal with these kinds of harassment and discrimination is too high a risk.”

So if you’re a woman, disabled, black or Asian or any other ethnic minority, a gay man, a lesbian, or a trans person, the SNP isn’t an inviting place. A little like the Scotland some people would like to create today.

We are in a snap-back moment. The onward march of progress that seemed to reach its zenith with the right for gay people to marry is now under attack.

Read more: The far right has infected how Scotland debates dealing with Covid

I’ll be okay. I’m white. I’m a man. I’m straight. I’m able-bodied. But my women friends, my disabled friends, my gay, lesbian and trans friends, my black and Asian friends: they’re the ones at risk.

Have no doubt about it, those who are coming for the rights of sexual minorities today, will come for the rights of women tomorrow. It would be very convenient for them if they were able to render the next generation dumb not only about sex and sexuality but their rights as well.

There's an authoritarian narrative unfolding in Scotland that would return us to a very dark place: to a place where it was men like me in control, where the white, straight, male had all the power and everybody else depended on their largesse and tolerance. That is not the kind of country we want to become … again.

Our columns are a platform for writers to express their opinions. They do not necessarily represent the views of The Herald