In a stunning victory for the anti-establishment forces that have upended mainstream politics across the Western world, British voters chose on Thursday to pull their country out of the European Union, sending global markets into a tailspin and encouraging anti-E.U. forces across the continent to push for their own referenda on whether to break away.

“The E.U. is failing, the E.U. is dying,” declared the leader of the U.K. Independence Party, Nigel Farage, one of the leaders of the campaign for the British exit, or Brexit, from the union formed from the ruins of Europe after World War II. “It’s a victory against big business…against big politics,” he told reporters early on Friday morning, as the results showed 52% of the votes had been cast in favor of leaving and 48% against.

That margin of victory – amounting to around 1.3 million votes – did not simply repudiate the British government’s calls for openness and unity with Europe. It also offered a blueprint for how ballot-box insurgencies across the West could, in the course of a single campaign, shatter the legitimacy of the ruling elites.

This formula is a familiar one, drawing fuel from a potent mix of xenophobia and angst over the loss of sovereignty and national identity. In the last couple of years, it has been deployed with explosive effects across Europe — and looks set to define the race for the U.S. presidency.

Donald Trump, the Republican presidential candidate, just happened to arrive in the U.K. to open a golf resort as the final results were announced, and wasted no time in linking them to his own insurgent campaign. British voters had “taken their country back,” he said, echoing a slogan that has helped him win over the base, if not always the old guard, of the Republican Party.

“In a sense, the result of this referendum is a victory for Trumpism the world over,” says Tony Travers, a noted political scientist in London and adviser to the British parliament. “It definitely has the same roots.” Trump supporters, much like backers of Brexit, tend to feel that traditional parties have ignored their concerns over migration and economic inequality for too long. Their response has been a wide-ranging revolt against the status quo that has opened the political arena to a variety of upstart candidates for the first time in a generation or more.

In France, Denmark, Sweden, Austria and the Netherlands, among other E.U. members, right wing and Eurosceptic parties have made enormous gains in popularity, especially after more than a million asylum seekers poured into Europe last year from across the Middle East and North Africa. Many of these parties have reacted to the U.K. referendum by urging their countries to follow suit. “Now it’s our turn,” the far-right leader of the Dutch Party for Freedom, Geert Wilders, told a local radio station on Friday.

For populists like Trump and Wilders, who have both referred to Islam as a threat to national security, the U.K. referendum has shown how hard it is for established parties to contain public resentments over mass migration and a perceived loss of national control. In the end, the most convincing argument for British voters to stay in the E.U. was, “better the devil you know than the devil you don’t,” says Simon Hix, a professor of political science at the London School of Economics.

It didn’t work. Weighed against the prideful nativism that fueled the opposing camp, such appeals proved ineffective in convincing a majority of British voters to stick with the devil they knew. Now, the British government will need to renegotiate its trade and political relationship with the European Union over a number of years, amending or repealing many of the laws and regulations that bind its state institutions with those of other members states.

It will be a gargantuan effort that Prime Minister David Cameron, for one, will not be involved in. He said Friday he would not lead the country beyond September, as the voters had rejected his pleas for the U.K. to stay in the E.U. “I do not think it would be right for me to be the captain that steers our country to its next destination,” Cameron said.

That destination looked so uncertain to financial markets on Friday that the British pound lost about 12% of its value against the dollar in the course of six hours, marking the steepest plunge on record. The Bank of England, the country’s central bank, tried to reassure the markets that it would “take all necessary steps” to maintain financial stability. But stock markets around the world still went into freefall, with Europe’s main indexes losing 8% in morning trading.

As these economic realities began to set in, some supporters of the Brexit had second thoughts about their decision. “I have a heavy heart this morning,” says Chris Morris, a 69-year-old cab driver in London. “It won’t affect me too much. I’m old. I got no debts. But I do worry for my daughters who have mortgages to pay,” he says. The referendum, however, cannot be taken back. “So we just have to wait and see what happens,” Moriss says. “It’s in the lap of the gods now.”

Get The Brief. Sign up to receive the top stories you need to know right now. Please enter a valid email address. Sign Up Now Check the box if you do not wish to receive promotional offers via email from TIME. You can unsubscribe at any time. By signing up you are agreeing to our Terms of Use and Privacy Policy . This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply. Thank you! For your security, we've sent a confirmation email to the address you entered. Click the link to confirm your subscription and begin receiving our newsletters. If you don't get the confirmation within 10 minutes, please check your spam folder.

Contact us at letters@time.com.