Dr Jamie Whyte is the the IEA’s Director of Research. He was the leader of ACT New Zealand.

Jeremy Corbyn, John McDonnell and Diane Abbott, the senior figures of the Labour Party, are genuine socialists – industry-nationalising, wage-regulating, Venezuela-loving, soakers of the rich. In last week’s general election, they won 40 per cet of the vote. Polls suggest that, if the election were re-held today, Labour would win a majority.

This may seem shocking. How can so many people be willing to vote for socialism – a political system under which governments invariably end up impoverishing and imprisoning their citizens?

But a glance across the UK’s political landscape makes it less surprising. Which party makes the case for free markets? Certainly not the SNP, Greens, Plaid Cymru or UKIP. And nor, any longer, do the Conservatives. Which means that no one does. The rise of socialist ideology in is no more surprising than the Tories’ retreat from economic liberalism.

It is a sorry tale.

Popular legend has it that at Margaret Thatcher’s first cabinet meeting as Prime Minister, she thumped a book on the table and declared, “This is what we believe!” That book was The Constitution of Liberty by Fredrich Hayek, the twentieth century’s most profound defender of economic liberty.

Being not only human but also a politician, Thatcher was impure in thought and deed. She compromised economic liberalism in many ways. But she was a consistent defender of its virtues, and a brilliant critic of socialism. In fact, she gave us what must remain the best joke at its expense. “The problem with socialism”, she said, “is that eventually you run out of other people’s money”.

When the Berlin Wall fell in 1989, the ideas of Hayek and Thatcher were triumphant. Marxism had been refuted, in theory and now practice. Francis Fukuyama famously declared the “end of history”, meaning the permanent victory of market liberalism.

And that is when the rot set in. Having won the battle, the Conservatives gave up the fight.

Only a year after the collapse of Soviet communism, Thatcher was ousted by her own party. And “Thatcherism” – a synonym for free markets and small government – was becoming a pejorative term among many Tories.

As Britain boomed following Thatcher’s reforms, the idea that capitalism is cruel took hold. In 2002, Theresa May told the Conservative Party that it must stop being the “nasty party”. And by 2005, David Cameron had become the Party’s leader.

Cameron rejected free market capitalism. This fact is obscured, I think, by his promotion of “austerity”. But there can be no doubt about it.

Whereas Thatcher had thumped Hayek’s book onto the cabinet table, Cameron instructed his ministers to spend their 2010 summer holiday reading Happiness by Lord Layard of Highgate, a book which, amongst other economic interventions, advocates punitive income taxes, not to raise revenue but to discourage people from working. To design his Big Society, Cameron recruited Philip Blond, an anti-market Christian moralist. And he established the “Nudge Unit” in Number Ten, a group that devises ways of tricking us into behaving as politicians want us to.

When explaining his policies on taxation and government spending, Cameron declared that “those with the broadest shoulders should bear the greatest burden”. Which is nothing but a weight-lifting variation on Marx’s principle: from each according to his ability, to each according to his need.

Finally, we got May, with her industrial policy, workers on boards, energy price caps, increased regulation of employment, and explicit disavowal of economic freedom – or the ideas of “the libertarian right”, as she put it in her 2016 conference speech.

Conservative politicians have spent the last 15 years endorsing the collectivist and illiberal ideas of their political rivals. It is hard to believe they underwent a genuine conversion. I suspect they expected political gain from it, and little risk. Perhaps they believed that history really had ended in 1989, and that market capitalism would survive no matter how little support they gave it, no matter even if they repudiated it.

If so, they made a grave error. History does not end, and the war of ideas must be waged relentlessly. Socialism has been calamitous wherever it has been tried, from ancient Sparta to twenty-first century Venezuela. But people are quick to forget. Jeremy Corbyn’s Labour party won 40 per cent of the vote among people aged between 45 and 54 – people who were adults when the Berlin Wall fell.

An unreconstructed socialist such as Corbyn should have been easily defeated. Thatcher would have crushed him, as she did the more formidable Michael Foot. But how could May expose the folly of his thinking, when she had already endorsed so much of it?

The “modernisers” of the Tory party think that people with clear principles are unattractive cranks. If, in five years’ time, they find themselves queuing for food at their local Red Star state supermarket, perhaps they will change their minds.

In the meantime, we here at the Institute of Economic Affairs, which Hayek helped to found, will keep explaining why economic freedom is always and everywhere superior to socialism.