NEW YORK --  For decades, Wall Street has considered London a beacon through which it could reach the rest of Europe. Large U.S. banks moved thousands of employees there to trade currencies and complex financial products. A couple of years ago, Goldman Sachs began building a massive new headquarters to house its 6,000 employees in the city.

But Britain’s stunning vote on Friday to divorce itself from the European Union has thrown London’s status as Europe’s financial center into question -- and with it, the city’s relationship with New York bankers.

From London, Wall Street has been able to sell its services across 28 nations without the headache of having to get regulatory approval from each individual country. The prospect of a more complex, and potentially costly, regulatory structure has some banking officials worried, analysts said. U.S. banks could move more than 10,000 employees out of London after Britain completes its exit from the European Union, according to Keefe, Bruyette & Woods, a boutique investment bank.

"U.S. banks have used London as a primary center for activity, not only to operate in the U.K., but to provide services across Europe," said James Chessen, chief economist for the American Bankers Association.

The shock of the British vote tanked U.S. markets Friday with the financial sector taking among the toughest hits. Goldman Sachs and JPMorgan Chase were both down 7 percent. Morgan Stanley tumbled 9 percent.

Britain's exit is also expected to impact other U.S. industries. Technology firms have jousted before with European regulators, but that process could become more complicated as  populist leaders call for referendums in France and the Netherlands to leave the EU, as well.

On Friday, shares of Apple fell 2.5 percent. Alphabet, Google’s holding company, lost 3.5 percent and Yahoo and Microsoft were each down about 4 percent.

In energy stocks, BP was trading down 5 percent, and Shell, domiciled in both Britain and the Netherlands, was down 6 percent after news of the “Leave” vote. American crude oil prices dropped $2.54 a barrel, or 5 percent.

Oil prices stiffened in the weeks leading up to the vote, as the “Remain” camp surged in polls. The Brexit caught investors by surprise. They rushed to sock assets away in non-eurocentric currencies and products, opting for American investments instead, or staying out of the market completely.

But the impact on U.S. banks is expected to be among the most severe, and the industry was both vocal -- and aggressive -- in its opposition to Britain leaving the EU.

Goldman Sachs and JP Morgan Chase, the country’s largest bank by assets, contributed 500,000 pounds, then about $720,000, each to the campaign to keep the status quo in the European Union, according to people familiar with the matter. Citigroup and Morgan Stanley donated 250,000 pounds each, according to the Sunlight Foundation.

On Friday, U.S. banks quickly began to draw up plans to deal with the fallout.

Citigroup created a "group of senior leaders from across our businesses and functions to ensure we were prepared for this possible outcome," Mike Corbat, the bank's chief executive, and Jim Cowles, its chief executive in Europe, Middle East and Africa, said in a letter to employees. "While the result of the vote is not what we would have preferred, our diligent work over the past six months means we can be confident that Citi is well positioned to serve our clients."

Britain's finalization of its exit from the E.U. is expected to take at least two years, and banking industry officials say they will carefully watch the process for clues into how vast the fallout will be. Britain, for example, may be able to establish a financial regulatory framework that is harmonious with the rest of Europe. That would minimize the potential impact, analysts said. But if that is not possible, banks may be forced to move jobs to Frankfurt or Dublin, they said.

"Likely London will lose some influence," Erik M. Oja, equity analyst for S&P Global Market Intelligence. But it depends on the negotiations that will occur over the new few years, he said:   "These banks have invested a lot into the London hub, it’s not like they will move overnight."

On Friday, JPMorgan Chase CEO Jamie Dimon told employees in a memo  that the bank will maintain a large presence throughout Britain. "In the months ahead, however, we may need to make changes to our European legal entity structure and the location of some roles," Dimon said. "While these changes are not certain, we have to be prepared to comply with new laws as we serve our clients around the world."

Dimon said earlier this month that Brexit could force the bank to relocate thousands of employees. "After a Brexit we cannot do it all here, and we will have to start planning for that. I don't know if it means a thousand jobs, 2,000 jobs. It could be as many as 4,000," he said from Bournemouth on the southern coast of England, according to the BBC.

Bank of America, which considered contributing to the Remain campaign, but ultimately stayed neutral, according to news reports, said it was still assessing the fallout from the vote.

"In the coming months, we will get a much clearer understanding of what the implications of this might be for our business, as well as the decisions that we will need to make before the change in membership becomes effective," Alex Wilmot-Sitwell, president of Bank of America's Europe, Middle East and Africa division, said in a letter to employees.

The most significant impact may be for Goldman Sachs, which isn’t expected to finish its new London headquarters until about 2019. “We have had a strong team focused on this potential result for many months,” Lloyd C. Blankfein, Goldman Sachs’ chief executive, said in a memo to employees.

Jacob Bogage contributed to this report.