At the Democratic convention last week, I experienced an uncomfortable feeling of deja vu. Emblazoned across the arena was the rallying cry of the Hillary Clinton campaign - "Stronger Together". It was a depressing reminder of "Stronger In", the slogan of the losing Remain campaign in Britain's referendum on European Union (EU) membership.
This similarity is more than an unfortunate coincidence. I would point to three parallels between Brexit and the Donald Trump phenomenon that should worry the Clinton campaign. The first is the potency of immigration as an issue. The second is the way in which the Trump and Brexit campaigns have become vehicles for protest votes about economic insecurity. The third is the chasm between elite opinion and that of the white working class.
Both the Trump and Brexit campaigns have put the promise to control immigration at the centre of their operations. In Britain, the Brexiters' demand to "take back control" was understood to mean, above all, a promise to stop the flow of immigrants from Europe. Mr Trump's most famous campaign pledge is to "build the wall" and stop illegal immigration from Mexico to the United States.
In both the UK and the US, immigration has become a powerful symbol of the elite's alleged willingness to undermine the living standards of the working class by allowing in cheap labour from overseas. The Brexit and Trump campaigns have also fused anxiety about immigration with fear of terrorism. Mr Trump has notoriously called for a ban on all Muslims entering the US. The Brexit campaign featured posters about the refugee crisis in the EU, playing to concerns about a flow of Muslim immigrants from the Middle East.
The Remain campaign never found a way to deal with public anxiety about immigration, and the Democrats may be falling into the same trap. Mrs Clinton's declaration last week that "We will not build a wall" drew huge cheers from the floor of the convention. But the British experience suggests that declarations of this sort might simply be interpreted as a refusal to engage with public concerns about migration. Mr Trump is certainly making that case, tweeting recently that "Hillary's vision is a borderless world where working people have no power, no jobs, no safety".
Mr Trump's claim to champion the poor and those with precarious jobs is also politically potent. Something similar worked in Britain, where the Remain campaign failed to anticipate that the referendum would turn into a vehicle for a protest vote about jobs and living standards. In Britain, most people have not seen any rise in real wages since the financial crisis of 2008, and many regions of the country have suffered economic stagnation for decades.
After the Brexit vote, journalist John Lanchester observed: "To be born in many places in Britain is to suffer an irreversible lifelong defeat - a truncation of opportunity, of education, of access to power, of life expectancy."
The same could be said of many areas in the US, where average real wages have dropped in recent decades. The life expectancy of white Americans without a college degree has also fallen since 2000, driven, according to The New York Times, by an "epidemic of suicides and afflictions stemming from substance abuse".
A Harris poll released last year showed that 85 per cent of Americans believe the people running the country do not care about them and 81 per cent believe the rich are getting richer, while the poor are getting poorer.
The problem for Mrs Clinton - and it is a big one - is that she embodies the political establishment that a large majority of Americans now appear to despise. The Democrats make the obvious point that Mr Trump's life is a monument to his indifference to ordinary people. But the more the US elite and "mainstream media" unite against him, the more they underline his status as an anti-system candidate.
Some argue that Mr Trump's base in the white working class is too small to carry him to victory in November. But that problem may not apply if the Republicans can significantly increase voter turnout. Once again, the British experience is relevant. The victory for Brexit was secured by many working-class voters who had not bothered to turn out in recent general elections.
In Britain, the political elite's disconnect with working-class opinion led most commentators to dismiss the many opinion polls that suggested Britain was going to vote Leave. In the US last week, I encountered a similar incredulity among many American pundits whose horror of Mr Trump makes it almost impossible for them to countenance the idea that he might be their next president.
The similarities between the Brexit and the Trump campaigns are striking, but there are also important differences. Most obviously that while the Brexit campaign used a dog whistle to appeal to racist sentiment, Mr Trump is using a foghorn.
The most prominent Brexit campaigners, such as Mr Boris Johnson and Mr Michael Gove, strove to remain outwardly affable during the campaign. By contrast, Mr Trump has specialised in the erratic and abusive. It is possible that his behaviour will turn off enough voters to deliver victory to Mrs Clinton. Having lived through Brexit, I would not count on it.
We have been experiencing some problems with subscriber log-ins and apologise for the inconvenience caused. Until we resolve the issues, subscribers need not log in to access ST Digital articles. But a log-in is still required for our PDFs.