Bagpipes greet Donald Trump as he arrives at his Trump Turnberry Resort on June 24, 2016, in Ayr, Scotland. Jeff J Mitchell/Getty Images)

As Donald Trump's campaign progressed, Britain's June 23 vote to leave the European Union was clearly on his mind.

“They will soon be calling me MR. BREXIT!” Trump tweeted in August, prompting a somewhat confused response. He soon upped the ante — telling supporters at rallies in October that the U.S. presidential election would be “Brexit plus” and “Brexit times five.”

It was certainly possible to see the similarities in the two campaigns. Both Trump fans and Brexiters tended to be people who scorned the status quo and held negative views about globalization, immigration and political correctness. Often they wanted to upend the system and evinced a desire to bring their respective countries back to greatness.

The American businessman seemed to be implying that he was being underestimated in much the same way that the Brexit campaign had been by Britain's political establishment. And there were certainly some who agreed.

“The greatest parallel between the Brexit vote and to what may happen on Nov. 8 is that Brexit mobilized a large number of nonvoters — indeed, some people who had never voted in their lives,” Nigel Farage, the former leader of the United Kingdom Independence Party and a key architect of the Brexit push, said in an article for The Washington Post in September.

However, when Trump first made his comments about Brexit, he was widely mocked. Many suggested that he was misinterpreting the Brexit vote, which was a referendum on a single issue rather than a vote for a specific political candidate.

Although Britain's vote to leave the E.U. caused shock, it wasn't entirely unexpected — at least two major pollsters predicted a victory for the “leave” camp, with others saying it would be an extremely tight race. In the U.S. contest, Trump was given far worse odds. Polls had shown him trailing Democratic rival Hillary Clinton for months — the last Post-ABC tracking poll had Trump trailing Clinton 43 percent to 47.

Even forecasters who had correctly predicted the Brexit vote outcome didn't think Trump would win, giving him, on average, a 30 percent chance of winning, according to one survey.

Yet Tuesday, the unexpected happened. Trump won. With a projected 276 electoral votes, the political novice is expected to be the next U.S. president, though he may well have a smaller share of the total vote. What's more, his Republicans allies have held on to both the Senate and the House, giving Trump even more of a mandate.

Brexit times five? Suddenly that statement doesn't seem so unreasonable. Trump had beaten expectations by a far wider margin than Brexiters had in their campaign.

For Britons watching Tuesday's election, there was a sense of déjà vu as the results first came in. The Clinton camp's swing from confidence to uncertainty to despair and denial reminded many of the wild emotional ride that “remain” supporters had taken during Britain's referendum. And as Trump began to rack up unlikely wins in formerly Democratic strongholds, Farage took to Twitter to note the similarities with Britain's vote. His September prediction seemed to be coming true.

By Wednesday morning, “Brexit and Trump” began to trend on Twitter in the United Kingdom. While there were some celebratory tweets, often the messages expressed despair, with many users raking over the path to the twin defeats to ask: What went wrong? Familiar fingers were pointed at elitist politicians, out-of-touch journalists and inaccurate pollsters.

Right now, however, a full postmortem may be premature. As anyone watching the situation in Britain over the past few months will tell you, Brexit is far from a done deal: A recent court decision suggested that a hard exit from the E.U. may be politically difficult, if not impossible. Even in the immediate aftermath of the Brexit vote, “leave” campaigners were accused of walking back their biggest promises, and there were reports of regret among those who voted in favor of Britain exiting the E.U.

Similarly, it remains to be seen what kind of president Trump will be and whether the grand vision he pitched to his supporters — including remarkable ideas such as building a wall on the border with Mexico or a 45 percent tariff on Chinese imports — is actually implementable. Even for the pro-Brexit camp, there's unpredictability here: How will “Mr. Brexit” deal with a post-Brexit Britain, a country where politicians until recently were insulting him and debating whether to ban his entry?

Right now, an uncertainty about the future is what really ties together the future of Trump and Brexit. And the world may soon get more uncertainty. France will have its own general election next year — and far-right leader Marine Le Pen is looking more confident than ever.

More on WorldViews:

What a real ‘Brexit Britain’ would look like