We are going through a great mass derangement. In public and in private, people are behaving in ways that are increasingly irrational, feverish, herd-like and unpleasant. The news is filled with the consequences. Yet while we see the symptoms everywhere, we don’t see the causes.

Various explanations have been given, usually involving Donald Trump, Brexit, or both. But these explanations don’t get to the root cause of what is happening. For beneath all the day-to-day madnesses – over race, sex, sexuality, gender and the rest – are much greater movements and much bigger events. Even the origin of this mass derangement is rarely acknowledged. This is the simple fact that we have been living through a period of more than a quarter of a century in which all our grand narratives about our existence have collapsed.

Religion went first, falling away from the 19th Century onwards. Then, over the past century, the secular hopes held out by all political ideologies followed. In the latter part of the 20th Century, we entered the post-modern era, defined by its suspicion towards grand narratives.

Hundreds of demonstrators take part in the 'Women Demand Bread and Roses' protest organised by Women's March in Trafalgar Square, London, on January 19

However, nature abhors a vacuum. People in today’s wealthy Western democracies could not simply remain the first people in recorded history to have no explanation for what we are doing here and no story to give life purpose.

The question of what exactly we are meant to do now – other than get rich and have fun – was going to have to be answered by something. The answer that has presented itself in recent years has been to live in a permanent state of outrage. To find meaning by waging constant war against anybody who seems to be on the wrong side of a question to which the answer has only just been altered.

The bewildering speed of this process has been principally caused by the Silicon Valley giants (notably Google, Twitter and Facebook). They have the power not just to direct what most people in the world know, think and say, but have a business model which has accurately been described as relying on finding ‘customers ready to pay to modify someone else’s behaviour’.

But today’s wars of ideas are not random – they are consistently being fought in a new and particular direction. And that direction has a purpose that is vast. The purpose – unwitting in some people, deliberate in others – is nothing less than to embed a new religion into our societies.

The controversial statue of Cecil Rhodes, British imperialist, on the front of Oriel College, University of Oxford. Students led a Rhodes Must Fall campaign

though the foundations had been laid over several decades, it is only since the financial crash of 2008 that there has been a march into the mainstream of ideas that were previously known solely on the obscurest fringes of academia.

The interpretation of the world through the lens of ‘social justice’ and ‘identity group politics’ is probably the most audacious and comprehensive effort since the end of the Cold War at creating a new ideology.

To date, ‘social justice’ has run the furthest because it sounds – and in some versions is – attractive. Even the term is set up to be impossible to argue with. ‘You’re opposed to social justice? What do you want, social injustice?’

The attractions are obvious. After all, why should a generation which can’t accumulate capital have any great love of capitalism? And it isn’t hard to work out why a generation who believe they may never own a home could be attracted to an ideological world view which promises to sort out every inequality. The place where social justice finds its warriors is identity politics. This atomises society into different interest groups according to sex (or gender), race, sexual preference and more. It presumes that such characteristics are the main, or only, relevant attributes of their holders and that they bring an added bonus. As the American writer Coleman Hughes has put it, it assumes there is ‘a heightened moral knowledge’ that comes with being black or female or gay. It’s why people start statements with ‘Speaking as a ...’. And this new religion is something that people both living and dead must be on the right side of.

That’s why there are calls to pull down statues of historical figures viewed as being on the wrong side and it is why the past needs to be rewritten to suit any interest group you wish to champion.

Identity politics is where minority groups are encouraged to simultaneously atomise, organise and go on the attack. Tied into this is something social justice warriors call ‘intersectionality’ – the notion that there is a hierarchy of oppressed minorities and society should organise itself around correcting this.

Today, intersectionality has broken out from the social science departments of the universities from which it originated into the mainstream. It’s now taken seriously by millennials and has become embedded via employment law (through a ‘commitment to diversity’) in all major corporations and governments.

The speed at which the ‘social justice’ causes have taken over everyday life is staggering. Once-obscure phrases such as ‘LGBTQ’, ‘white privilege’, ‘the patriarchy’ and ‘transphobia’ are suddenly heard everywhere – even though in the words of mathematician Eric Weinstein, they were ‘all made up about 20 minutes ago’. The policing of these issues is an even more recent phenomenon. Researchers found that phrases like ‘triggered’ and ‘feeling unsafe’ only spiked in usage from 2013 onwards.

It is as though, having worked out what it wanted, the new religion took a further half-decade to work out how to impose its credo on non-believers. But it has done so with frightening success.

The maddening results can be seen on a daily basis. It’s why a British academic study which found muscular, wealthy men are more attractive could be headlined by Newsweek magazine as: ‘Men with muscles and money are more attractive to straight women and gay men – showing gender roles aren’t progressing.’

It’s why a previously completely unknown programmer at Google could be sacked for writing a memo suggesting some tech jobs appeal more to men than women. It is why The New York Times ran a piece by a black author with the title: ‘Can my children be friends with white people?’ And it’s why a piece about cycling deaths in London written by a woman was framed through the headline: ‘Roads designed by men are killing women.’

Such rhetoric exacerbates existing divisions and creates new ones. For what purpose? Rather than showing how we can all get along better, the lessons of the last decade appear to be exacerbating a sense that in fact we aren’t very good at living with each other.

For most people, awareness of this new religion has become clear not so much by trial as by public error. Because one thing that everybody has begun to sense in recent years is that a set of tripwires have been laid across the culture. Among the first tripwires was anything to do with homosexuality. In the latter half of the 20th Century, there was a fight for gay equality which rightly succeeded in reversing a terrible historic injustice. Then, the war having been won, it didn’t stop. Indeed it began morphing. GLB (Gay, Lesbian, Bi) became LGB so as not to diminish lesbians. Then a T for ‘trans’ and a Q for ‘queer’ or ‘questioning’ got added. Then the movement behaved – in victory – as its opponents once did, as oppressors.

When the boot was on the other foot, something ugly happened.

A decade ago, almost nobody was supportive of gay marriage. Even gay rights group Stonewall wasn’t in favour. Now it’s a central tenet of modern liberalism. To fail the gay marriage test – only years after almost everybody failed it – is to put yourself beyond the pale.

People may agree with or disagree with gay marriage. But to shift mores so fast needs to be done with sensitivity and deep thought. Yet we engage in neither.

Other issues followed a similar pattern. Women’s rights had also been steadily accumulated throughout the 20th Century. They too appeared to be arriving at some sort of settlement. Then, just as the train appeared to be reaching its desired destination, it filled with steam again and went roaring off into the distance. What had been barely disputed until yesterday became a cause to destroy someone’s life today. Whole careers were scattered and strewn as the train careered along its path.

Careers like that of the 72-year-old Nobel Prize-winning UCL Professor Tim Hunt were destroyed after one lame joke, at a conference in South Korea, about men and women falling in love in the lab. What was the virtue of making relations between the sexes so fraught? Why, when women had broken through more glass ceilings than at any other time, did talk of ‘the patriarchy’ seep out of feminist fringes and into popular culture?

In a similar fashion, the civil rights movement in America, which started to right the most appalling of all historic wrongs, looked like it was moving towards some hoped-for resolution. Again, near the point of victory everything soured.

Just as things appeared better than ever before, the rhetoric started suggesting things had never been worse.

The most recent tripwire addition, and most toxic of all of them, is the trans issue. It affects the fewest number of people, but is nevertheless fought over with an almost unequalled ferocity and rage. Women who have got on the wrong side of the issue, including notable feminists like Julie Bindel and Suzanne Moore, have been hounded by people who used to be men.

Meanwhile, mothers and fathers who voice concerns that ten years ago would have been considered common sense have their fitness to be parents questioned. People who will not concede that men can be women (and vice versa) can amazingly now expect a knock on the door from police.

Last September, a billboard that comprised the dictionary definition ‘woman: noun, adult human female’ was taken down after someone complained it was a ‘symbol that makes transgender people feel unsafe’.

Everyone knows what they will be called if their foot nicks against society’s new tripwires. Bigot, homophobe, sexist, misogynist, racist and transphobe are for starters. To avoid these accusations, citizens must prove their commitment to fashionable causes.

How might somebody demonstrate virtue in this new world? By being ‘anti-racist’, clearly. By being an ‘ally’ to LGBT people, obviously. By stressing how ardent your desire is to bring down the patriarchy.

And this creates a situation where public avowals of loyalty to the system must be made regardless of whether it’s needed. It’s an extension of a problem in liberalism identified by the late political philosopher Kenneth Minogue as ‘St George in retirement’ syndrome. After slaying the dragon, the warrior finds himself stalking the land looking for more glorious fights. Eventually, after tiring himself out in pursuit of ever-smaller dragons, he may eventually be found swinging his sword at thin air, imagining dragons.

Today our public life is dense with people desperate to slay imagined dragons. On all the big issues, an increasing number of people, with the law on their side, now pretend that all questions have been resolved, all answers agreed upon – and that no good person can have any doubts. The case is very much otherwise.

Each of these issues is infinitely more complex and unstable than our societies admit. Yet while the endless contradictions, fabrications and fantasies within each are visible, identifying them is not just discouraged but policed.

And so we are asked to agree to things which we cannot believe, and told not to object to things to which most people object, such as giving children drugs to stop them going through puberty or allowing men who self-identify as female to use female toilets. The pain that comes from being expected to remain silent on important matters and perform impossible leaps on others is tremendous, not least because the problems are so evident.

As anyone who has lived under totalitarianism can attest, there is something demeaning and eventually soul-destroying about being expected to go along with claims you do not believe to be true.

If the belief is that all people should be regarded as having equal value and be accorded equal dignity, then that may be all well and good. But if you’re asked to believe there are no differences between men and women, racism and anti-racism, homosexuality and heterosexuality, then this will drive you to distraction. That distraction is something we’re in the middle of and something we must try to find our way out from. If we fail, the direction of travel is clear.

We face not just a future of ever-greater atomisation, rage and violence, but a future in which the possibility of a backlash against all rights advances – including the good ones – grows more likely.

A future in which racism is responded to with racism, denigration based on gender is responded to with denigration based on gender. At some stage of humiliation there is simply no reason for majority groups not to retaliate with the exact same weapons that have worked so well on themselves.