The U.K.'s shock vote to leave the European Union has stunned the world.
Late last night, even Nigel Farage, one of the most prominent leave campaigners and leader of the U.K. Independence Party, said that he thought remain would edge it.
So how did this surprise result happen?
One of the biggest reasons that traders were complacent about the possibility of a leave vote was that the betting markets, which are often believed to be more reliable than polling, suggested remain would carry the day.
Pippa Malmgrem, the author and economist, argued that these results were skewed by those betting on Remain placing larger bets.
The geographic split of the leave versus remain vote shows a strong euroskeptic vote in parts of the U.K. which were once strong Labour heartlands, before the opposition party started losing ground to the U.K. Independence Party. Jeremy Corbyn, the Labour Party leader, who has expressed ambivalent views about the EU in the past, was not seen as a particularly strong voice for the Remain campaign.
After failing to predict the Conservative Party's victory in last year's general election, the U.K.'s pollsters were under pressure. Even though polls regularly suggested that the vote might swing to leave, traders followed the betting instead.
Never has it been more evident what a bubble London exists in. The international flavor of the country's capital, and particularly the moneyed elite who work in its financial center, meant that many were ignorant, or just dismissive, of the concerns of those outside the city.
This referendum was called by U.K. Prime Minister David Cameron because of a promise made in his election campaign to renegotiate terms with the EU and then hold a referendum, designed to win over voters he feared would defect to UKIP.
He appears to have underestimated just how many leading figures in his own party, including long-term friends like Justice Secretary Michael Gove and former Mayor of London Boris Johnson, would join the leave campaign, and the momentum it would gather.
Matthew Goodwin, the professor of politics at the University of Kent who is the author of a book on UKIP's rise, pointed out that the elite had failed to appeal to many in U.K. society.
The younger you are as a U.K. voter, the more likely you were to vote remain. A YouGov poll suggested 75 percent of 18-24 year olds voted Remain, with just 39 percent of those over 65 voting to stay in the European Union.
Also the young are more likely to be active on social media. This is one reason why the remain campaign may have appeared stronger than it actually was.