WASHINGTON — It wasn't supposed to go this way.

Although fears of a possible vote by the United Kingdom to leave the European Union had been growing, most U.S. analysts and bankers believed the chances of the "Brexit" push succeeding were unlikely. But after Britain shocked the world by voting Thursday in favor of secession, global markets quickly plunged into turmoil. The value of the British pound plummeted and bank stocks got hammered.

"This is an extraordinarily dangerous situation," said Karen Shaw Petrou, managing director of Federal Financial Analytics.

The only bright spot for U.S. banks is that they appear better prepared for shocks, based on the results from the Dodd-Frank Act stress tests completed on Thursday. The test — which anticipated a severe economic downturn — was harder than last year's, yet big banks scored better.

"If any institutions are prepared for it, it's the U.S. [big banks] — see yesterday's results and be comforted," Petrou said. "That said, stresses are now only partially reflected in DFAST. That's credit-risk-focused and what's up now is liquidity and to lesser extent operational."

Marty Mosby, director of bank and equity strategies at Vining Sparks, said "Britain leaving the European Union creates uncertainty in global financial markets that will certainly push valuations lower," especially for large U.S. banks.

"However, we would suggest that these banks are much better prepared for economic stress than they have ever been," he wrote in a note to clients.

GLOBAL CONTAGION

Yet the fears of global contagion are already growing. In the short term, the vote is likely to keep the Federal Reserve Board from raising interest rates as it waits to assess financial stability.

"The decision of a majority of U.K. voters to leave the European Union has caught global financial markets completely off guard," said Scott Anderson, chief economist at Bank of the West. "While still early hours, my Q3 forecast for U.S. GDP is at risk now from the current global financial contagion. Central banks will likely need to factor this shock into their monetary policies, and may need to add emergency liquidity in some places to shore up financial stability."

Petrou said her biggest concern is contagion risk to global systemically important banks from asset managers pulling stand-by lines and from ETFs.

"Time to see who's right about how resilient asset management is and hope we don't learn the hard way," she said.

James Chessen, the chief economist at the American Bankers Association, predicted that uncertainty will last over the next 12 to 18 months, making businesses reluctant to expand.

"Uncertainty freezes business decisions and there will be some hesitancy in expansion desires because the rules are changing. That affects not only banks but the businesses they serve," he said.

A GATEWAY NO MORE

One concrete consequence of the vote is that U.S. banks are likely to restructure their foreign operations. Most use London as a gateway to Europe, but that may no longer be possible. Once the breakup procedure is triggered, U.K. and Europe will spend the next two years negotiating the terms of Britain's exit — a process likely to be painful as European policymakers seek to send a message to other countries considering leaving.

"For U.S. global banks, they have to rethink using London as the portal to the rest of the European Union," Chessen said. "That is going to take time to reassess."

There are also thorny questions about cross-border resolution planning. The U.K. has "been the center" of those negotiations, according to H. Rodgin Cohen, a lawyer at Sullivan & Cromwell.

"So much cooperation and collaboration has been between the Bank of England and the U.S. — and it may take some time to reestablish that wherever else it may be," he said.

There are also practical concerns, as the eventual status of EU citizens living in the U.K. is now unclear.

"Apart from any formal restructuring of bank operations in London, there is the uncertainty regarding the thousands of bankers, traders and other key employees who are not British but working in London because of their EU citizenship. What will happen to them?" said Heath Tarbert, a lawyer at Allen & Overy.

Jamie Dimon, the CEO of JPMorgan Chase, alluded to these possible changes in a memo to employees on Friday.

"In the months ahead ... we may need to make changes to our European legal entity structure and the location of some roles," Dimon wrote. "While these changes are not certain, we have to be prepared to comply with new laws as we serve our clients around the world. We will always do our best to take care of our people and do the right thing during times of change. We recognize the potential for market volatility over the next few weeks and we are ready to help our clients work through it."

U.S. banks operating in the U.K. may also have to deal with new sets of financial regulations — a process that will take time and create more uncertainty.

Banks "understand what the rules of the road are [for] operating in Europe," said Robert Burns, a consultant and former Federal Deposit Insurance Corp. official. There will be "questions about how the rules of the road potentially change."

Gary Swiman, head of regulatory and compliance consulting in BDO's financial services advisory practice, said that "from a regulatory perspective, the biggest issue at stake for financial institutions is whether the passport system continues or ends."

"If it ends, the key will be whether there will be an allowance for U.K. products to be treated as an affiliate by the EU," he said. "If an allowance isn't made, then the regulatory burdens and requirements will be multijurisdictional and add significant complexity to in areas such as conflict of laws."

BIG BANKS' RESPONSE

Banks responded Friday with projections of confidence, insisting they were ready for this eventuality.

"Citi has been preparing for this potential outcome for many months and we are well positioned to continue to support our clients through this period of uncertainty," a spokesman for Citigroup said.

Wells Fargo said it will adjust its operating business model "as needed, to ensure we comply with any changing legal and regulatory requirements as we continue to serve our customers throughout the region."

Bank of New York Mellon said it was "ready to handle the market volatility and high volumes anticipated as the implications of this decision become clearer."

"Looking ahead, we remain in constant communication with our regulators," the bank said. "We have the flexibility and resources to adapt to any necessary infrastructure change which may be needed as a result of the formal UK-EU relationship and market access protocols negotiations. ... We believe that we are strongly positioned to continue to provide services and solutions to our clients through all our European legal entities."

British banks like HSBC, meanwhile, also tried to present an aura of calm and stability.

"We are today entering a new era for Britain and British business," said Douglas Flint, the group chairman of HSBC. "The work to establish fresh terms of trade with our European and global partners will be complex and time consuming. ... As one of the largest, most stable, liquid and prudent financial institutions in the world, HSBC is well placed to support our customers and the markets as they deal with the challenges that will arise."

Anthony Browne, the CEO of the British Bankers' Association, said that "a significant amount of contingency planning has already been undertaken and the industry is very well prepared, and have increased capital and liquidity. Banks will now assess what the result means for their customers and staff in the long term."

Regulators, meanwhile, said they were watching the situation.

"The OCC is carefully monitoring developments following the results of the U.K. referendum on membership in the European Union," said a spokesman for the Office of the Comptroller of the Currency. "The OCC routinely works with the banks it supervises to ensure bank management understands the unique risks facing their banks, and that they have established the appropriate risk management controls to identify and react to a variety of emerging concerns and contingencies such as this."

EFFECT IN THE U.S.

The Brexit vote is liable to reverberate financially and politically in the U.S. Some said mortgage rates will fall as the Fed appears unlikely to raise rates anytime soon.

"Mortgage rates will tumble following the Brexit vote, possibly hitting new record lows," said Greg McBride, the chief financial analyst for Bankrate.com.

Gus Faucher, deputy senior economist at PNC Financial Services Group, said that an expected drop in interest rates could further squeeze bank margins, but said it also might spur another wave of mortgage refinancings and encourage more home purchases.

But some also saw implications for the presidential election here. The Brexit vote was fueled by concerns over immigration and anger at the political establishment — two themes that presumptive Republican nominee Donald Trump has tapped into.

"We expect the immediate impact of Brexit will be an uptick in support for Donald Trump over Hillary Clinton," analysts at Height Securities wrote.

Polls in the U.K. understated the vote to exit the EU, leaving some to wonder whether support for Trump will also be broader than expected.

"Observers are now forced to discount that a similarly underestimated wave of working class anger could ultimately belie polls in the U.S. presidential race that, to date, have favored the better-known Mrs. Clinton," Charles Gabriel, president of the policy research firm Capital Alpha Partners, wrote in a note to clients. "The eerie similarities with the U.K. Brexit campaign suggest that a dive toward U.S. nationalism will now be dramatically depicted as just one notional and frightening consequence by those trying to defeat the erratic billionaire in November."

Doug Duncan, Fannie Mae's chief economist, agreed that it was easy "to see parallels between the sentiment of U.K. voters and the sentiment of voters in the U.S. presidential election."

This already seems to have raised the degree of uncertainty in the minds of the business community regarding future economic policy and prospects, Duncan said.

Such uncertainty "may dampen already weak capital investment activity and the most recent employment data have already registered a slowdown in hiring," he said.

Lalita Clozel, Ian McKendry, Kristin Broughton, Alan Kline, Kate Berry, Brian Collins, Kevin Wack and Andy Peters contributed to this article.