Since the election, Jeremy Corbyn has been parading himself as prime-minister-in-waiting. ‘Cancellation of President Trump’s State Visit is welcome,’ he tweeted this week, ‘especially after his attack on London’s Mayor and withdrawal from #ParisClimateDeal.’ The message was clear: unlike ‘Theresa the appeaser’, Jeremy is willing and able to tell that climate change-denying Islamophobe across the water to get stuffed. Jez we can, Jez we can.

There may be another reason why Corbyn is glad to think that Trump might not come to these shores, and that’s because the more the British see of the dreaded Donald, the more they might recognise how much he and the Labour leader have in common. For Labour voters, the unpalatable truth is that the British equivalent of Trump is not Brexit, as everyone says: it’s Jeremy Corbyn.

Corbyn, 68, and Trump, 70, are both anti-establishment insurgents who have been married three times. They both like dictators and dislike Nato. They both have embarrassing pasts which should disqualify them from high office. When they were elected to lead their parties, Trump and Corbyn were both dismissed as jokes. Their emergence was seen as a sign that their parties had gone mad — but it turned out the electorate was just as mad, and the laughing stopped. Both men then got lucky: they stood against seemingly invincible women who took victory for granted and turned voters against them with their arrogance.

Until recently, the British prided ourselves on how sensible our politics was

compared to the populism ravaging so much of the developed world. Look, we said, Ukip is perishing; the BNP is all but dead. We’d never fall for a rabble-rouser like Trump. But this analysis missed a rather important point: Corbyn was the torchbearer of British populism, and his politics is staggeringly popular. He has increased Labour’s share of the vote by more than any other leader since Clement Attlee in 1945. The man who had been dismissed as a hangover of the 1970s has proved to be very good at 21st-century general elections.

Clearly the similarities between Corbyn and Trump only go so far. One is a capitalist nationalist; the other an internationalist anti-capitalist. Trump worships money and doesn’t like refugees; Corbyn professes to love migrants and doesn’t like rich people. Donald calls terrorists losers; Jeremy calls them friends. As political phenomena, however, the Jez and the Donald are almost the same. They represent grassroots and online movements which thrived precisely because the media never took them seriously. Their rhetoric has been at times identical — indeed, Corbyn was much mocked for copying Trump’s talk of a ‘rigged system’ that benefits the few and not the many.

During their campaigns, both men drew huge crowds, and generated enormous buzz on social media — yet journalists just scoffed and said they didn’t stand a chance. Voters aren’t altogether stupid: they noticed the bias and turned against it.

Corbynistas won’t take kindly to being compared to Trumpists. For them, Corbyn means hope and Trump means hate — apparently those are the only two forces in global politics. On the left, the American version of Corbyn is thought to be Bernie Sanders, another admirably stubborn codger who appeals to radical young people in spite — or possibly because — of his age.

The politics of Corbyn and Sanders are fashionably retro. They are both politically correct in a comfortingly fuddy-duddy way — something which could not be said of Trump. Corbyn and Sanders identify with each other, and have often expressed mutual admiration. Last weekend, Bernie declared himself ‘delighted’ at Labour’s achievements. ‘People are rising up against austerity and massive levels of income and wealth in-equality,’ he said.

Seeing Corbyn’s success, American left-wingers have taken to lamenting that Sanders failed to beat Hillary Clinton to the Democratic Party nomination last year. The ‘Bernie would have won’ hashtag has started trending again on Twitter, as it did after Clinton lost to Trump in November. But Americans are more allergic to socialism than the British, and Bernie wasn’t the Democratic nominee.

The truth is that in terms of recent history, Labour has a lot in common with the Republicans. Both parties rebranded and repositioned themselves in the 1990s to win back power, much to the unease of their base. Both parties then alienated supporters by dragging the country into war in Iraq. Labour and the Republicans were still in power when the financial crisis struck in 2008, and subsequently lost the next election. The Republicans lost again with Mitt Romney in 2012, as did Labour with Ed Miliband in 2015. Then their voters on both sides of the Atlantic started to revolt. Instead of accepting the wisdom of the party elites, they turned to men thought to be laughably unelectable.

It seemed at first that Trump and Corbyn had destroyed their parties — or at least that their ascents had shown just how moribund Labour and the Republicans had become. It was assumed that their freakish popularity would burst upon contact with democratic reality. Both Labour and Republican party hierarchies tried to organise coups against the insurgent. This only ended up re-enforcing the new leader’s strength, and the party bigwigs despaired.

Yet far from condemning their parties to decades in the wilderness, Trump and Corbyn turned out to have had a much broader appeal than their predecessors. Their popularity was viral — ‘infectious’, as Corbyn called it on television last weekend. It didn’t just excite the angries and the radicals on the fringes; it infected the moderate middle, too. Swing voters were not put off by Trumpist or Corbynite radicalism; they were enticed.

That’s why Trump, a New York tycoon, was able to win in traditionally Democratic states such as Wisconsin, Michigan and Pennsylvania. It wasn’t just the left-behind poor who voted for Trump in these areas; it was also half of those earning $100,000 to $200,000 a year. They knew how they were meant to vote, and they did the opposite. Some similar dynamic might explain why Jeremy Corbyn’s Labour, led by lifelong enemies of the propertied classes, won in Kensington, Britain’s richest constituency.

When Trump won last year, the Republican leaders who had made such seemingly principled stands against him suddenly declared that they had learned to love the Donald, and they showered him with praise. Trump relished their humiliation, and allowed them to kiss his ring.

Something similar is now happening in Labour. Senior party figures who have spent the past two years conspiring against Corbyn are now offering him their loyalty and support. Chuka Umunna now praises Corbyn’s ‘energetic and engaging’ campaign. Yvette Cooper, who had been plotting to oust Corbyn after the general election, is now offering to serve on his shadow frontbench. An unexpected sense of unity is breaking out within Labour, and Jeremy Corbyn is telling the world that he is willing to be generous towards his former enemies. He’s a man of peace, after all.

The key difference, for now, is that while both men failed to win popular majorities, Trump assumed power and Corbyn has not. Trump’s approval rating has now dipped to 38 per cent, and his presidency is widely regarded as a shambles. Corbyn’s popularity, on the other hand, continues to surge, and the bookmakers say no one is more likely to become our next prime minister.

So we can all laugh at Donald Trump: his simplicities, his demented ideas and the craziness of a country that elected him. But in Britain, we could be just one general election away from playing out our own version of the same drama.

Freddy Gray speaks to Matt Zarb-Cousin and James Bloodworth about Labour's populism on The Spectator Podcast.