Former Mayor Boris Johnson of London and his wife, Marina Wheeler, arriving to vote in the EU referendum at a polling station in north London on Thursday. REUTERS/Peter Nicholls It's a Brexit: Britain has chosen to leave the European Union.

Britons voted Thursday on whether the UK should stay in or leave the 28-nation bloc, with the results counted overnight.

As of 7 a.m. BST (2 a.m. ET) on Friday, the final results showed that 51.9% voted to leave the EU versus 48.1% that voted for Britain to stay within the EU. That contained 17,410,742 votes for Leave and 16,141,241 votes for Remain.

The turnout was 72.2% of the 46,499,537 people who were entitled to take part in the vote. This is a record number for a UK poll.

The voting day was severely disrupted by mass flooding and reports of registration errors, with some people unable to vote.

The votes were counted in 382 local counting areas representing 380 local government areas in England, Scotland, and Wales and one each for Northern Ireland and Gibraltar.

The result will come as a shock for many observers, as the polls published a day before the vote suggested that Remain was in the lead.

SurveyMonkey, one of the few polling companies to correctly predict the outcome of the 2015 General Election, which saw David Cameron's Conservative Party win a majority, had said the Remain vote swung "decisively" into the lead after a huge televised debate between the two campaigns on the BBC.

The poll showed that 50% wanted to Remain in the EU while 47% wanted to Leave. Just 24 hours before that result, SurveyMonkey had Leave at 49% and Remain at 48% in another poll.

Overall, support for Remain had seemed to gather momentum in the week leading up to the referendum. An ORB poll for The Telegraph newspaper indicated a 7-point lead (53% to 46%) for the campaign for Britain to remain in the EU, while a NatCan survey gave Remain a 6-point lead (53% to 47%).

On Wednesday, the bookmaker Ladbrokes gave the Leave vote just a 24% chance of winning, while William Hill was similarly unconvinced, pegging a Brexit likelihood at only 25%. This fell in the week before the referendum, when the likelihood of a Leave vote hovered around the 40% mark.

So what happens next? If you were paying attention to the various predictions over the past few months, you'll know the forecasts are pretty dire. Here are some key points from HSBC: