A total of 70 per cent of voters, and 82 per cent of 18-24 year olds, expected the UK to stay in the EU – so how did the country vote to leave?
Lord Ashcroft, the Tory peer turned pollster, has ran a poll which gives us a good idea. Unlike most polls, which are yet again being pilloried after failing to predict a major election, this poll is reflective rather than predictive.
It asked a far bigger group of people than most polls, and was weighted to reflect the 52:48 result for Brexit, so its data can be taken as a pretty accurate picture of how Britain voted on Thursday
First, here's how different areas voted. You can hover, click and zoom on the map to explore areas in more depth.
When did voters decide? It appears the overwhelming appetite to leave Europe is more than a year old, and was secured a few months ago, with Leave merely hanging onto their support in recent weeks, having won the crucial margin in 2014 and 2015.
Unsurprisingly, Ukippers were almost unanimous in their support for Brexit (take the 4 per cent with a pinch of salt; you can find single-digit support for almost anything in a poll, they come with margins of error).
The real story of the night is that more than a third of Labour supporters backed Brexit. The Remain camp was banking on the support of at least 70 per cent of Labour voters, if not closer to 75-80 per cent.
In the end only 63 per cent of Labour voters wanted to stay in.
Tories were more pro-Brexit - only 42 per cent remain - but actually by less than polls had predicted.
Ashcroft's research questioned people's affection for many of the major movements in modern democracy.
Those who rejected these movements, from multiculturalism to feminism or environmentalism, were much more likely to vote Leave than Remain.
But those who welcomed them (not shown in the graph) were by no means unanimous supporters of Remain.
29% of multi-culturalists voted to leave, as did 32% of social liberalists, 40% of feminists, 38% of environmentalists and 38% of those who consider themselves pro-globalisation.
Even 21% of those who are pro-immigration voted to leave. A tiny percentage compared to other categories, but still a fifth.
Another of the ways to think about Remain's problem is through this graph.
And here's how support for Brexit differed by race and ethnicity.
Finally, and perhaps most disturbingly to Remain voters, 7 in 10 Leave voters said they thought there wasn't much in yesterday's vote.
Leave voters were three times as likely to say that as Remain voters, more than three-quarters of whom thought the wrong vote would have disastrous consequences.Reuse content