President Trump’s support for Britain’s exit from the European Union may be about to collide with his election-year hopes of presiding over a strong economy.

The president has long seen “Brexit” as reflecting the same sort of nationalist impulse that drove his White House upset in 2016. He has hailed British Prime Minister Boris Johnson, who vows to sever ties with Europe on Oct. 31 no matter what, as a kindred populist spirit.

But as British Parliament this week dealt Johnson a stunning four consecutive defeats, the prospect of further delay in leaving the E.U. or a chaotic no-deal divorce spiked.

Continuing instability in the world’s fifth-largest economy — coupled with anti-government protests in Hong Kong, a U.S.-China trade war, and financial problems in major developing countries such as Argentina and Turkey — threatens to become a drag on an already troubled global economy.

“This is a highly volatile environment,” said Gregory Daco, chief U.S. economist for Oxford Economics. “You have a toxic cocktail of revolution and general political uncertainty in Europe, Asia, Latin America...and the news from the rest of the world remains consistently tilted to the downside.”

The U.S. economy remains largely healthy, with growth percolating at about a 2 percent annual rate and unemployment near a half-century low. But investors expect the Federal Reserve in two weeks to cut interest rates for the second time this year, largely because of weakness abroad.

In Jackson Hole, Wyo., last month, Fed Board Chair Jerome H. Powell cited the “growing possibility of a hard Brexit” and “rising tensions in Hong Kong” among the geopolitical risks that could unravel the U.S. expansion.

Global worries already are showing up in currency and bond markets. Investors seeking the safety of liquid markets or guaranteed returns are driving up the value of the dollar and U.S. government securities. The greenback last month reached an all-time high against a basket of major trading currencies.

That’s a hint of what might happen in the event of an abrupt Brexit. If Britain were to quit the E.U. without a formal withdrawal agreement — as Johnson has threatened — the biggest blows would fall on the United Kingdom and its European trading partners.

U.K. output would shrink by more than 5 percent while unemployment and inflation would soar, Mark Carney, the governor of the Bank of England, told Parliament earlier this week.

Broader effects on business and investor confidence would ripple through global financial markets. A further flight to safety by global investors could send the dollar even higher, which would make American goods more expensive for foreign buyers. That would depress U.S. exports, potentially increasing the trade deficit that the president insists he will narrow, economists said.

“Brexit is a multiyear looming catastrophe,” said Douglas Rediker, chairman of International Capital Strategies, a financial consultancy. “If you go over the cliff, the cost is more than just a quantitative cost in terms of trading impacts. It’s a reminder to financial markets that other bad things can happen.”

Despite the economic danger, the Trump administration continues to cheer on the long-running Brexit drama. At the White House on Wednesday, the president praised the embattled British prime minister shortly before his fourth parliamentary humiliation in little more than 24 hours.

“He’s a friend of mine, and he’s going at it; there’s no question about it,” Trump told reporters. “Boris knows how to win. Don’t worry about him.”

The president’s statement came after Vice President Pence backed Brexit during a meeting in Dublin with Irish Prime Minister Leo Varadkar, who warned that the process will be “deeply disruptive” to the two-decade-old peace agreement in Northern Ireland, which is part of the United Kingdom.

Trump, who bragged in 2016 on Twitter that people would “soon be calling me MR. BREXIT,” spoke with Johnson by phone last month about how the two countries could quickly conclude a new trade agreement.

The British leader has sought to cast a new trade deal with the United States as an example of the benefits of leaving the E.U., which sets trade policy for its 28 members. American and British negotiators have met six times in the three years since establishing a joint working group.

Despite Trump’s optimism about “rapidly” closing a deal, the British leader has acknowledged that agreement in the next year is unlikely. Stumbling blocks include American demands to open the National Health Service to U.S. drugmakers and to allow genetically modified seeds on British farms.

“A U.S.-U.K. deal will be a lot more difficult to make, and will take longer, than either Trump or Johnson thinks,” said William Reinsch, a former Commerce Department official now at the Center for Strategic and International Studies. “It’s less about tariffs than it is about different standards and regulatory approaches. If we insist on ours, it will force the U.K. to choose between us and the E.U., and the latter as a whole is by far their larger trading partner.”

Trade with the E.U. accounts for roughly half of the United Kingdom’s total goods and services trade, more than $800 billion. That’s far more than the $262 billion in commerce with the United States.

“If it goes badly — or if there is a hard Brexit — there will be a global economic impact,” said Dan Price, who coordinated international economic policy for President George W. Bush.