Great Britain’s stunning vote to exit the European Union has roiled U.S. markets and the presidential race.

Republican Donald Trump Donald John TrumpUS reimposes UN sanctions on Iran amid increasing tensions Jeff Flake: Republicans 'should hold the same position' on SCOTUS vacancy as 2016 Trump supporters chant 'Fill that seat' at North Carolina rally MORE — on British soil Friday to open a golf course in Scotland — relished in the Brexit decision, highlighting it as a symbol of his own rise in U.S. policies.

ADVERTISEMENT

“What happened should have happened, and they'll be stronger for it,” the presumptive GOP presidential nominee said of the British vote.

The Dow Jones industrial average was down nearly 500 points at midday. Markets had gone up a day earlier, with traders signaling their belief that Great Britain would vote to stay in the EU.

Instead, the “leave” campaign won by a greater margin than nearly anyone expected, taking 52 percent of the vote compared to the "remain” campaign’s 48 percent. More than 17.4 million people took part in the vote.

The decision to leave will trigger complicated negotiations between London and Brussels and between London and the United States.

Immigration was a key issue in the Brexit vote, with those supporting the “leave” movement expressing frustration with a rising tide of immigrants coming from the rest of Europe. Net migration into Great Britain last year totaled 330,000.

Those frustrations have been echoed in the United States by Trump and his supporters, who have repeatedly argued that their concerns are ignored by political and business leaders in the country.

In the Brexit vote, there were clear signs of an anti-elite sentiment that has fueled Trump’s popularity.

Trump, whose signature issue on the campaign trail has been to stop illegal immigration, practically predicted the vote would lead to his own election, saying it would be followed by “many other cases” where people would act to “take their borders back.”

“They took back control of their country,” he added of Brexit voters.

Former British Prime Minister Tony Blair told CNN on Friday that he saw similar themes in the Brexit vote and the U.S. political primaries that featured Trump's win in the GOP race and a strong run by Bernie Sanders Bernie SandersNYT editorial board remembers Ginsburg: She 'will forever have two legacies' Two GOP governors urge Republicans to hold off on Supreme Court nominee Sanders knocks McConnell: He's going against Ginsburg's 'dying wishes' MORE in the Democratic primary.

“Who you elect as president is up to you,” Blair said. “What I do think is, there is a strange coming together of populism from the left and the right.”

Blair also pointed to rising populist anger, saying it sometimes “displaces rational thought.”

Hillary Clinton Hillary Diane Rodham ClintonJeff Flake: Republicans 'should hold the same position' on SCOTUS vacancy as 2016 Momentum growing among Republicans for Supreme Court vote before Election Day Warning signs flash for Lindsey Graham in South Carolina MORE used the vote to make a dig at Trump, saying it showed the need for experienced leadership in Washington.

“This time of uncertainty only underscores the need for calm, steady, experienced leadership in the White House to protect Americans' pocketbooks and livelihoods, to support our friends and allies, to stand up to our adversaries, and to defend our interests,” she said. “It also underscores the need for us to pull together to solve our challenges as a country, not tear each other down.”

If the vote was a defeat for elites in Great Britain and Europe, it was also a defeat for President Obama.

In a visit to London earlier this year, Obama lobbied voters against exiting the EU, warning they could not guarantee they’d get a new trade agreement with the United States.

That effort, almost certainly done in cooperation with British Prime Minister David Cameron, appeared to backfire given the vote. At the time, “leave” supporters argued that Obama should not have meddled in Britain’s affairs.

Cameron said Friday that he would resign as prime minister in October, arguing British voters should have a different leader to take them to the next stage.

Obama, for his part, offered assurances that the U.S.-U.K. relationship would remain close.

“The people of the United Kingdom have spoken, and we respect their decision,” Obama said in a statement. “The special relationship between the United States and the United Kingdom is enduring, and the United Kingdom’s membership in NATO remains a vital cornerstone of U.S. foreign, security, and economic policy.”

House Speaker Paul Ryan Paul Davis RyanKenosha will be a good bellwether in 2020 At indoor rally, Pence says election runs through Wisconsin Juan Williams: Breaking down the debates MORE (Wis.), the highest-ranking Republican in the United States, did not offer an opinion on Brexit ahead of the vote.

But he offered similar words as Obama in taking a reassuring tone on Friday.

“I respect the decision made by the people of the United Kingdom. The UK is an indispensable ally of the United States, and that special relationship is unaffected by this vote,” Ryan said in a statement.