How did the Leave camp clinch victory in the referendum on the UK's membership of the EU after what was a very closely fought contest?
The Leave campaign triumphed right across England and Wales, winning in large northern cities including Sheffield, the Welsh valleys, across the Midlands including Birmingham, and the south and east of England.
The Leave share of the vote mapped
Nine areas voted by over 70% to leave, many of them in eastern England including Boston, South Holland and Great Yarmouth.
The Remain share of the vote mapped
The Remain campaign, in contrast, dominated in London, Scotland and Northern Ireland. The highest share of the vote achieved by the Remain camp was in Gibraltar, which is not shown on the map above.
Seven of the 10 areas with the highest share of the vote for Remain were in London, including Lambeth, Hackney and Haringey, all of which polled over 75% to stay in the European Union.
Edinburgh polled over 74% for Remain and Belfast West polled 74.1%.
Overall the Leave campaign came top in nine of the UK's nations and regions, with the Remain campaign coming top in just three. The West Midlands had the highest vote share for Leave, with Scotland highest for Remain.
Who turned out to vote?
The turnout was high at 72%, with more people turning out to vote than in last year's general election. Over 30 million people voted.
Younger people voted Remain
According to polling by Lord Ashcroft, younger voters were much more likely to vote Remain than older voters.
But turnout in areas with a higher proportion of younger residents tended to be lower.
As well as age, educational attainment and national identity were also key factors in how the UK voted.
The overall result
Leave polled the most strongly in 270 counting areas, with Remain coming first in 129.
What happened in the first referendum?
Thursday's referendum was the UK's second referendum on Europe. Back in 1975 the UK voted to stay in by a clear margin. In the 1970s Scotland was one of the areas that voted most strongly against the Common Market, a total reversal as compared with 2016.
Full list of every voting area by Leave
The chart below shows the nearly 400 voting areas that took part in Thursday's referendum. They are ordered by their strength of the vote for the Leave Campaign, those with the strongest support are listed first.