All that seemed solid in liberalism is melting into air. In Europe the EU struggled for over seven years to reach a trade deal with Canada, one of the most “European” countries in the world; at the same time, banking crises are festering in Italy and Germany and the continuing migrant crisis continues to strengthen far-right parties. In Britain Jeremy Corbyn’s strengthened hold over Labour following an ill-considered attempt to unseat him has reinforced a transformation in the party that reaches well beyond his position as leader. At a global level, Vladimir Putin is redrawing the geopolitical map with his escalating intervention in Syria, while the chief threat to the repressive regime Xi Jinping is building in China appears to be a neo-Maoist movement that harks back to one of the worst tyrannies in history. A liberal order that seemed to be spreading across the globe after the end of the Cold War is fading from memory.

Faced with this shift, liberal opinion-formers have oscillated between insistent denial and apocalyptic foreboding. Though the EU is barely capable of any action, raddled remnants of the old regime – Ed Miliband, Clegg, Mandelson, “the master” himself – have surfaced to demand that Brexit be fudged and, in effect, reversed. Even as the US election hangs in the balance, many are clinging to the belief that a liberal status quo can be restored. But Trump’s presidential campaign has already demolished a bipartisan consensus on free trade, and if he wins, a party system to which his Republican opponents and Hillary Clinton both belonged will be history. Dreading this outcome and suspecting it may yet come to pass, liberals rail against voters who reject their enlightened leadership. Suddenly, the folly of the masses has replaced the wisdom of crowds as the dominant theme in polite discourse. Few ask what in the ruling liberalism could produce such a debacle.

The liberal pageant is fading, yet liberals find it hard to get by without believing they are on what they like to think is the right side of history. The trouble is that they can only envision the future as a continuation of the recent past. This is so whether their liberalism comes from the right or the left. Whether they are George Osborne’s City-based “liberal mainstream”, or Thatcherite think tanks, baffled and seething because Brexit hasn’t taken us closer to a free-market utopia, or egalitarian social democrats who favour redistribution or “predistribution”, an entire generation is finding its view of the world melting away under the impact of events.

Today’s liberals differ widely about how the wealth and opportunities of a market economy should be shared. What none of them question is the type of market globalisation that has developed over the past three decades. Writing in Tribune in 1943 after reviewing a batch of “progressive” books, George Orwell observed: “I was struck by the automatic way in which people go on repeating certain phrases that were fashionable before 1914. Two great favourites are ‘the abolition of distance’ and ‘the disappearance of frontiers’.” More than 70 years later, the same empty formulae are again being repeated. At present, the liberal mind can function only to the extent that it shuts out reality.

It is not surprising that there is talk of ­entering a post-liberal moment. The idea has the merit of grasping that the liberal retreat is not a revolt of the ignorant masses against enlightened elites; it is mostly the result of the follies of liberals themselves. But the revulsion against liberalism is not all of one piece. There is a world of difference between the May government inching its way towards a more intelligent way of ­living with globalisation and Trump’s dream of globalisation in one country. The creeping advance of anti-liberal forces across the European continent is something else again.

Accepting that this is a post-liberal moment does not imply that we should give up on values of freedom and toleration. Quite the contrary: the task at hand is securing the survival of a liberal way of life. But the greatest obstacle to that end, larger even than the hostility of avowed enemies of liberalism, is a liberal ideology that sees state power as the chief threat to freedom. Liberal societies have a future only if the Hobbesian protective role of the state is firmly reasserted. Balancing the claims of liberty against those of security will never be easy. There are many conflicting freedoms, among which political choices must be made. Without security, however, freedom itself is soon lost.

***

Nothing illustrates the decay of liberalism more vividly than the metamorphosis of the Labour Party. There has been a tendency to interpret Corbyn’s rise as a reversion to the Trotskyite entryism of the early 1980s. Some in the party – possibly including the shadow chancellor, John McDonnell – may see their role in terms of converting Labour to some type of neo-Marxism. That does not explain why so many of Labour’s new members seem to want to bury the party in the form in which it has existed throughout its history.

Something like a blueprint for the shift of power in the party was set out in Ralph Miliband’s Parliamentary Socialism, first published in 1961. Miliband’s attack on the Parliamentary Labour Party (PLP) anticipated the Corbynite strategy with uncanny prescience. Cautioning his comrades on the left who wanted to use Labour as a vehicle for socialism, Miliband wrote in a 1972 postscript to the book:

The kind of political changes at the top which a good many socialists hope to see one day brought about in the Labour Party, and which would signify a major ideological shift to the left, would presumably, given the nature of the political system, have to be engineered from within the ranks of the Parliamentary Labour Party. But to say this is surely also to indicate how unrealistic that hope is. It is unrealistic because it ignores the perennial weakness of the parliamentary left. That weakness is not accidental but structural . . . There have been some exceptions: a few Labour MPs have, so to speak, slipped through the net. But they have remained isolated and often pathetic figures, bitterly at odds not only with their leaders but with that large and permanent majority of the Parliamentary Labour Party which entirely shares its leader’s orthodox modes of thought.

Ralph Miliband condemned the PLP as an obstacle to fundamental change and looked to a mass movement outside Labour’s core structures. But history has proved more fertile than his imagination. In a strangely poetic turn of events, an anti-parliamentary party of a kind he believed Labour could never become was brought into being, more than 40 years later, when, by changing the membership rules, Ed Miliband created a historic opening for one of

its most isolated and insignificant figures. Promoted by moderates as a modernising move, on a par with Tony Blair’s revision of Clause Four, this accidental reform has altered Labour structurally and irreversibly. Corbyn’s rise to power could not have occurred if the party’s moderates had not been so devoid of new thinking. They realised that Ed Miliband’s social-democratic moment had failed to arrive and knew that Labour faced an uphill task in becoming electable again. But all they had to offer were empty slogans that reeked of the past. As a result, Labour has become unelectable in any foreseeable future.

Anyone who imagines the party’s electoral fortunes could be revived by a new leader – a charismatic figure from across the water, perhaps – has not taken the measure of the change that has taken place. Although parts of Labour remain outside Corbyn’s control, including much of local government – most importantly, Sadiq Khan’s London – the chief power base of any future leader of the party will be the mass movement that Corbyn has built. Realigning Labour with the electorate can only be done against the opposition of most of the party membership. In these conditions a campaign of the sort Neil Kinnock waged against Militant is no longer feasible. Internecine warfare will continue and may intensify, but Labour’s moderate tendency has no chance of regaining control.

In one sense, Corbyn’s Labour is the practical realisation of Ralph Miliband’s dream. Yet it is not a party Miliband would recognise easily. Labour has become not a retro-Trotskyite sect, but a contemporary expression of formless discontent. Trotsky was a vain and pitiless figure, who crushed a workers’ rising in Kronstadt in 1921 and rejected criticism of the practice of hostage-taking that he implemented during the Russian Civil War as “Quaker-vegetarian chatter”. But, even at his worst, Trotsky could not have proposed anything as inane and intrinsically absurd as retaining Trident submarine patrols while removing the missiles’ nuclear warheads, as Corbyn did in January.

The party Corbyn has created is not easily defined. Aside from the anti-Semitism that is a strand of its make-up, it has no coherent ideology. The legacy of Marxism is notable for its absence. There is no analysis of changing class structures or any systematic critique of the present condition of capitalism. Such policies as have been floated have been plucked from a blue sky, without any attempt to connect them with earthbound facts. The consensus-seeking values of core Labour voters are dismissed as symptoms of backwardness. As for the concerns about job security and immigration that produced large majorities in favour of Brexit in what used to be safe Labour areas, the Corbynite view seems to be that these are retrograde attitudes that only show how badly working people need re-education.

Corbyn’s refusal to specify any upper limit to immigration at the last party conference in Liverpool illustrated his detachment from electoral realities. But far from being a debilitating weakness – as it would be if Labour were still a conventional political party – this rejection of realistic thinking is the principal source of his strength in the new kind of party he has created. From being a broad-based institution that defended the interests of working people, Labour has morphed into a vehicle for an alienated fringe of the middle class that finds psychological comfort in belonging in an anti-capitalist protest movement. While a dwindling rump of trade union barons continues to act as power-broker, Labour’s northern fortresses are crumbling.

The defining feature of Corbynite Labour is not an anachronistic utopian socialism, but a very modern kind of liberal narcissism. Looking two or three general elections ahead, the party could well reach a membership of over a million even as it struggled to elect a hundred MPs. The party’s role would then be one of permanent opposition, without the privileges that go with being an alternative government.

***

The claim that what has emerged from Corbyn’s takeover of the Labour Party is an inchoate and extreme type of liberalism may seem perverse. He and his followers never cease to inveigh against neoliberal economics – a blanket term that seems to include every market economy in the world – even as they show a consistent bias in favour of tyrannies in their protests against military action, their anti-war campaigns focusing solely as they do on the policies of Western governments. It might seem that Labour under Corbyn has abandoned liberal values altogether, and there are some who talk of a new left-fascism.

Yet this is too easy an analysis of the change that has taken place. Corbyn’s Labour is no more crypto-fascist than it is Trotskyite. In some respects – such as his support for unlimited freedom of movement for people – it embodies a hyperbolic version of the liberalism of the most recent generation. In others, it expresses what liberalism has now become. There have always been many liberalisms, but the mutation in liberal thinking over the past few decades has been deep and radical. From being a philosophy that aimed to give a theoretical rationale to a way of life based on the practice of toleration, it has become a mindset that defines itself by enmity to that way of life.

Corbyn’s “inclusive” attitude towards Hamas, Hezbollah and the IRA fits in with a left-liberal world-view that supports ­anti-colonial struggles in a general embrace of identity politics. Fashionable nonsense about cultural appropriation may not matter much, as it has been largely confined to increasingly marginal universities. However, it expresses what has come to be seen as a liberal principle: the right of everyone to assert what they take to be their identity – particularly if it can be represented as that of an oppressed minority – by whatever means are judged necessary. If free speech stands in the way, the practice must be discarded. It terrorism is required, so be it. This represents a fundamental shift in liberal thinking.

The overriding importance given to rights – a selective reading of them, at any rate – is one of the marks of the new liberalism. In one form or another, doctrines of human rights have been around for centuries, and a conception of universal rights was embodied in the UN Declaration of 1948. But rights became central and primary in liberal thought only in the 1970s with the rise of the legalist philosophies of John Rawls and Ronald Dworkin, which held that freedom can be codified into a fixed system of interlocking liberties that can be interpreted by judges. On the libertarian right, Friedrich Hayek proposed something similar with his constitutional proposals for limiting democracy.

Protecting liberty is not just a matter of curbing government, however. Rolling back the state in the economy and society can have the effect of leaving people less free – a fact that was recognised by liberal thinkers of an earlier generation. Maynard Keynes understood that free trade allowed consumers a wide range of choices. He also understood that freedom of choice is devalued when livelihoods face being rapidly destroyed on a large scale, and partly for that reason he refused to treat free trade as a sacrosanct dogma. He never imagined freedom could be reduced to a list of rights.

The move to rights-based liberalism has had damaging effects in many areas of policy. A militant ideology of human rights played a part in some of the worst foreign policy disasters of recent times. The ruinous military adventures of the Blair-Cameron era did not fail because there was not enough post-invasion planning. They failed, first, because in overthrowing the despotisms of Saddam Hussein and Muammar al-Gaddafi they destroyed the state in both Iraq and Libya, leaving zones of anarchy in which jihadist forces could operate freely. More fundamentally, they failed because human rights cannot be imposed on societies that have never known them and where most people may not want them.

Any suggestion that liberal values are not humanly universal will provoke spasms of righteous indignation. Liberals cannot help believing that all human beings secretly yearn to become as they imagine themselves to be. But this is faith, not fact. The belief that liberal values are universally revered is not founded in empirical observation. They are far from secure even in parts of continental Europe where they were seen as unshakeable only a few years ago. In much of the world they are barely recognised.

That liberal values belong in a particular way of life was the central theme of the ­essays collected in my book Post-Liberalism (1993). Modern liberalism is a late growth from Jewish and Christian monotheism. It is from these religious traditions – more than anything in Greek philosophy – that liberal values of toleration and freedom have sprung. If these values were held to be universal, it was because they were believed to be ordained by God. Most liberals nowadays are secular in outlook, yet they continue to believe that their values are humanly universal.

It has never been clear why this should be so. A common response conjures up ­Enlightenment values against the demon of relativism, somehow forgetting that modern relativism emerged from the Enlightenment. Others invoke cod-theories in social science which claim that only liberal societies can be modern. Francis Fukuyama’s thesis is the best known, but they all assert that globalisation is producing a worldwide middle class that is demanding political freedom, as the European bourgeoisie is supposed to have done in the 19th and 20th centuries.

In fact, the European middle classes threw in their lot with authoritarian regimes as often as they supported freedom and democracy, and the same is true at a global level today. Much of the middle class in Russia appears wedded to a combination of consumerism and nationalism, and in China most seem to want nothing more than rising living standards and freedom in their private lives. In the United States, on the other hand, unchecked globalisation is destroying the middle classes.

If the liberalism that has prevailed over the past generation was a falsifiable theory it would long since have been abandoned. There is no detectable connection between advancing globalisation and the spread of liberal values. Liberals resist this because it empties their lives of significance. For them, liberalism is a surrogate religion, providing the sustaining illusion that their values express the meaning of history.

These may seem arguments far removed from everyday politics, but they have important practical implications. Liberal societies cannot depend on history for their survival. They need to defend themselves, and here the cult of rights needs deflating. Human rights may have value as symbolic barriers against the worst evils, such as genocide, slavery and torture. Where they are not backed by state power, however, ­human rights mean nothing: less than nothing, in fact, if they encourage people to believe they will be protected when (as in Srebrenica and now in Aleppo) the power to protect them is lacking. Human rights cannot serve as a template for world order. When they are used to promote evangelical military campaigns they endanger the way of life they were meant to protect.

***

Popular revulsion against established elites has produced some curious responses. There is constant talk about reason being junked in an emotional rejection of experts, as was supposed to have happened in this year’s EU referendum campaign. Yet the record hardly justifies any strong claims on behalf of those who claim special insight into economics or politics. Much of what has passed for expert knowledge consists of speculative or discredited theories, such as the sub-Keynesian ideas that support quantitative easing as a permanent regime and the notion that globalisation benefits everybody in the long run. When rattled liberals talk of the triumph of emotion over reason, what they mean is that voters are ignoring the intellectual detritus that has guided their leaders and are responding instead to facts and their own experiences.

What British voters are not doing is repudiating the society in which they live. For some critics of liberalism, what is needed is a rejection of individualism in economics and culture. This is the message of John Milbank and Adrian Pabst in The Politics of Virtue (reviewed by Rowan Williams in this paper on 14 October). The book promotes a neo-medievalist vision of organic community that would be familiar to Hilaire Belloc and G K Chesterton, whom Milbank and Pabst cite approvingly. Post-liberalism of this kind is, in my view, a dead end in politics. Most people in Britain do not want to live in organic communities. They are not nostalgic for an imaginary past, and show little fondness for the claustrophobic intimacy of unchanging, homogeneous neighbourhoods. They want what Thomas Hobbes called commodious living – in other words, the amenities of modern economy – without the chronic insecurity that is produced by unfettered market forces. Rather than rejecting market individualism, they are demanding that it be constrained. They would like to inhabit a common culture but are happy for it to contain diverse beliefs and lifestyles.

A post-liberal society is one in which freedom and toleration are protected under the shelter of a strong state. In economic terms, this entails discarding the notion that the primary purpose of government is to advance globalisation. In future, governments will succeed or fail by how well they can deliver prosperity while managing the social disruption that globalisation produces. Obviously it will be a delicate balancing act. There is a risk that deglobalisation will spiral out of control. New technologies will disrupt settled patterns of working and living whatever governments may do. Popular demands cannot be met in full, but parties that do not curb the market in the interests of social cohesion are consigning themselves to the memory hole. The type of globalisation that has developed over the past decades is not politically sustainable.

To expect liberals to comprehend this situation would be unreasonable. For them, it is not only the liberal order that is melting away, but any sense of their own place in history. From being the vanguard of human progress, they find themselves powerless spectators of events. But they insist that the solution to the crisis of liberalism is clear. What is needed is more of the same: a stronger infusion of idealism; an unyielding determination to renew the liberal projects of the past. The notion that any of these projects needs to be revised or abandoned – global free trade, say, or the free movement of labour across national borders – is unthinkable. The only thing wrong with past policies, they will say, is that they were not liberal enough.

Adamant certainty mixed with self-admiring angst has long defined the liberal mind and does so now. Yet beneath this, a different mood can be detected. All that really remains of liberalism is fear of the future. Faced with the world they thought they knew fading into air, many liberals may be tempted to retreat into the imaginary worlds envisioned by left-leaning non-governmental organisations, or conjured up in academic seminars. This amounts to giving up the political struggle, and it may be that, despite themselves, those who embodied the ruling liberalism are coming to realise that their day is done.

John Gray’s latest book is the new and enlarged edition of “Gray’s Anatomy: Selected Writings” (Penguin)