The Britons who voted to take their country out of the European Union were predominantly white, working class, older and deeply upset about immigration.
Their leaders drew scorn from the university-educated elite as nativists, borderline racists and occasional buffoons. Backing them was too risky, opponents said.
In the U.S. presidential election, Donald Trump draws strength from many of the same frustrations, fears and voting blocs that powered the "leave" campaign to victory in Thursday's British referendum.
"'Brexit' is Trump. Trumpism is everywhere. It's the same phenomenon, with the same results," a European diplomat told reporters in Washington on Friday, speaking anonymously to comment on other countries' politics.
A British referendum and a U.S. presidential election are, of course, different: For starters, the U.S. has a significantly larger, younger and more racially and ethnically diverse population than Britain.
About 15% of the British electorate is non-white, compared with more than 25% in a presidential election in the U.S., noted James Morris, a British pollster and advisor to former Labor Party leader Ed Miliband.
But in both countries, voters appear divided between those who feel — as Trump repeatedly says — that "we have no choice" but to embrace radical change and those who fear that the kind of change offered by him, and the Brexit campaign, amount to a huge step backward.
"The white working class seems to be rising up against the elites that live in college towns and big cities, and academia — and the political system — and saying, 'We're sorry, we don't like what you're doing,'" said veteran Democratic pollster and strategist Paul Maslin.
Twin questions hang over the U.S. election in the aftermath:
Will Trump prove too flawed a candidate to fully take advantage of the moment?
And will Hillary Clinton's campaign be able to come up with a positive, more compelling message than "be afraid" — a theme that failed to turn out enough voters to keep Britain in the EU?
Clinton has set out dozens of policy proposals during the course of her campaign, but has struggled to find an overarching theme that would seize voters' imaginations and encapsulate her message the way President Obama's "yes, we can" did in 2008 or Trump's "build that wall" has done — at least with his side of the electorate — this year.
Her current slogan, "Stronger together," might just as easily have fit on a "remain" button in London — and seemingly to similar effect.
A senior White House official pointed to Clinton's speech this week in North Carolina, in which she set out a distinctively progressive economic agenda, as an indication that the campaign had begun to lay out a more compelling positive message. The official conceded, however, that it was too early to tell whether voters would respond.
In the meantime, Democrats have focused on persuading voters to reject Trump — a case that Clinton prosecuted aggressively on economics this week and in a foreign policy speech three weeks ago.
Those attacks highlight another crucial difference between the two elections: A presidential campaign is not a referendum.
"The Brexit vote did not have a candidate," said Whit Ayres, the Republican pollster who served as chief strategist to Florida Sen. Marco Rubio's presidential campaign. "The decision about the presidency involves far more than disagreements over public policy. Character and leadership are going to be paramount in this choice for Americans in November."
British voters, narrowly, rejected warnings that a Brexit vote could cause economic chaos. Democrats feel they will have an easier time highlighting the risks of a specific individual who would have his finger on the proverbial nuclear button.
Trump has provided ample ammunition for their attacks. He did so again on Friday.
Visiting the golf course he owns in Scotland, he praised the referendum vote, saying the British had chosen to "take their country back," but only after he touted the sprinkler system, the drains and the luxury suites at his Turnberry resort.
Even as his campaign sent out a fundraising email hailing the British vote as a "brave stand for freedom and independence," he seemed at one point to welcome the crash of the British currency that threatened to undermine financial markets, noting that he might gain from it.
"When the pound goes down, more people are coming to Turnberry," he said.
Clinton's senior policy advisor, Jake Sullivan, seized on those remarks Friday, telling reporters that while the former secretary of State was focused on the potential economic effect that a British departure from the EU could have on Americans, Trump "actually rooted for this outcome" and "put his golf business ahead of the interests of working families in the United States."
Trump's comments, which drew groans from Republican political operatives, underscored another potential risk for him in the Brexit vote.
"Everything that I've seen suggests that Americans have been paying very little attention to this" until now, said Republican pollster Randall Gutermuth. For most voters, their first introduction to the British vote could be turmoil in financial markets that threatens to undermine their retirement funds, he said.
By the time the summer ends and the fall campaign begins in earnest, Trump's support for the "leave" side may associate him in voters' minds with a dangerous experiment threatening to fail disastrously, Gutermuth said.
"If the market does tank, it's not a position where I would want to get too out in front," he said, particularly "if you're running as the business person who understands how to run the economy."
But warning about the flaws of the other side can accomplish only so much, Maslin said.
Clinton "is defending an administration she was part of," he said. "If all she does is defend the status quo, scaring people about Trump, without offering a really positive vision about real possibilities for the future, then watch out."
Staff writers Noah Bierman, Michael A. Memoli, Christi Parsons and Tracy Wilkinson contributed to this report.
For more on Politics and Policy, follow me @DavidLauter
1:49 p.m.: This article has been updated with a reference to Donald Trump's fundraising email.
12:25 p.m.: This article has been updated with additional details and comment.
11:54 a.m.: This article has been updated with additional information and quotes.