Nearly every market move over the last two weeks has been attributed to the British referendum on whether the United Kingdom should remain with or leave the European Union.

A poll showed Brits might want to leave? Down go stocks. Then it looked like the U.K. would stay in the political and economic bloc? Here's 200 points to the upside for the Dow Jones industrial average. Now that the U.K. has officially voted in favor of leaving, markets are going wild. The Dow shed 500 points right out of the gate, before paring some of those losses. The British pound also posted its largest one-day fall ever, before recovering slightly. And it's not just trading desks who cared about Thursday's referendum. Federal Reserve Chair Janet Yellen said earlier this month that a British exit from the EU "could have consequences in turn for the U.S. economic outlook."

So, what exactly happened?

British citizens voted on the question, "Should the United Kingdom remain a member of the European Union or leave the European Union?" Polls closed at 10 p.m. London-time (5 p.m. Eastern), and then the official results were called about 9 hours later. Now that the leave camp has won, the process of a British exit from the EU will begin, but some estimates say the negotiations could take more than two years.

If Brits had voted to stay, then markets would have been free to breathe a sigh of relief. (According to the BBC, eligible voters were "British, Irish and Commonwealth citizens over 18 who are resident in the U.K., along with U.K. nationals living abroad who have been on the electoral register in the U.K. in the past 15 years. Members of the House of Lords and Commonwealth citizens in Gibraltar (would) also be eligible, unlike in a general election.")

And why is everyone nervous?

As could be expected, the primary stance of EU politicians was that the U.K. should stay within the bloc, but nations and expert groups across the world also expressed their preference for a stay victory. Important British trading partners — including India and China — indicated they were worried that an exit would create regulatory and political volatility that could harm the economies of everyone involved. The U.K.'s Treasury itself reported that its analysis showed the nation "would be permanently poorer" if it left the EU and adopted any of a number of likely alternatives. "Productivity and GDP per person would be lower in all these alternative scenarios, as the costs would substantially outweigh any potential benefit of leaving the EU," a summary of the report said. As the overall economy weakens, the British government would see weaker tax receipts than otherwise, and those losses would vastly outweigh the benefits of reduced contributions to the EU, according to the analysis. The Bank of England, the International Monetary Fund, and others have warned of the long-term negative effects of a British exit. And although some have dismissed those analyses as "rotten propaganda," most mainstream economists overwhelming agreed the move would be bad for the U.K.

That’s it? That’s the big global concern?

Yeah, so, this is where it gets a tad more complicated. The general thinking is that many international corporations, notably those based in the U.S. and China, invest in U.K. operations partly so they can readily access the free-trade corridors the U.K. enjoys with the rest of the European Union. So since the leave camp won, many of those companies could see drastically reduced profits. The sudden need to reset tons of global investment channels — against the background of the ambiguous and extended period of the U.K.'s exit negotiations — could have a freezing effect on the whole region. "Negotiations on post-exit arrangements would likely be protracted, resulting in an extended period of heightened uncertainty that could weigh heavily on confidence and investment, all the while increasing financial market volatility," the IMF said in an April report. "A U.K. exit from Europe's single market would also likely disrupt and reduce mutual trade and financial flows, curtailing key benefits from economic cooperation and integration, such as those resulting from economies of scale and efficient specialization." Depending on how you measure it, the EU as a whole ranges from the first to the third largest economy in the world. And in terms of trade, the bloc easily topped the U.S. and China in both imports and exports.

So a slowdown there would mean a global slowdown. One that could last months — if not years.

And here's why the fallout is global

Yeah, it does sound hyperbolic, but there are actually a couple arguments for why a British exit may hurt the rest of the globe. In Europe, the EU could run into economic trouble for a couple of reasons. The lengthy and as-yet ambiguous exit negotiations could cripple investment, as mentioned above, but they could also lead to more exits. Nationalist groups across Europe will be watching the referendum closely to see if they can use the results into their advantage. Elsewhere, the economic risks are best understood as a function of uncertainty. EU uncertainty: If financiers and companies are concerned that they may get cut out of free-trade channels, they may find safer (which is to say, less productive) uses for their money. And British uncertainty: All those billions of dollars already invested in the U.K. and invested abroad by British entities could be in limbo as London rushes to negotiate new non-EU trade deals with key partners. In the U.S., billions, if not trillions, of dollars could be called into question by a British exit: In 2014, American direct investment into the EU totaled about 1.81 trillion euros, and about 1.99 trillion euros flowed in the opposite direction, according to the European Commission. If even a small percentage of that is disrupted, it could reverberate across the globe. Similar concerns apply for Chinese, Indian, Japanese and other international companies and investors.

And then there's the issue of currencies...

With all of that uncertainty rushing around, a British exit will likely result in a massive rebalancing of currencies. Investors will (and have already begun to) dive out of the British pound and into cash that's perceived as safe — the Swiss franc, the Japanese yen, the U.S. dollar. The euro could also see some weakening if investors are worried about the fate of the EU. While being a safe haven could sound like a boon for the U.S. economy, such a large, sudden currency swing could have significant negative implications for American multinational corporations. The fallout from those currency moves could be another source of short- and medium-term economic tumult.

So why did the UK vote to leave?