It's looking very likely that we will now have to think what many thought unthinkable.
The ITV psephologists are saying that the final result of this EU referendum will be a Brexit.
The assumption that all would be well, that a clear majority of people would "see sense" at the eleventh hour and vote 'Remain' has proved massively over-optimistic.
Who is to blame for this result, if blame is the right word? The blame game has already started.
Labour is at fault for not getting its voters out. The SNP haven't done enough with theirs. The Tories started it, they called the referendum because their party is split on Europe. Etc, etc, etc.
All of the above have some truth in them though, as a matter of straight fact, this was a referendum called by David Cameron, though he would say after a manifesto promise to do so.
But if the Leave side has won, albeit closely, what does that mean?
Well, first if you are a voter in Dumfries, or Moffat, or Galashiels, or Eyemouth and changed your mind to vote Leave you have helped change the course of UK history.
The people have spoken. They have ignored what the Leave camp called 'Project Fear', the dire warnings about a Brexit.
The majority of the electorate who voted have, it seems, backed the idea of a UK outside the EU.
And what does it mean for Scotland? Well, it means the chance of a second independence referendum has increased.
In its manifesto for the recent Holyrood election the SNP put it thus:
"We believe that the Scottish Parliament should have the right to hold another referendum if there is clear and sustained evidence that independence has become the preferred option of a majority of the Scottish people – or if there is a significant and material change in the circumstances that prevailed in 2014, such as Scotland being taken out of the EU against our will."
s clear Scotland is voting by a healthy majority to remain in the EU, though there is - it should be said - a substantial minority in favour of Brexit north of the Border. It's 62% to 38% Leave to Remain.
So, with a Remain vote in Scotland and a Leave vote overall in the UK, First Minister Nicola Sturgeon will be under huge pressure to press ahead with this SNP manifesto commitment.
But this in itself is fraught with difficulty. There are many in the SNP who, frankly, think this would be a disaster for them and their ultimate objective of Scottish independence.
Former MSP and ex-minister Marco Biaggi has major reservations, arguing that if there is an economic hit to the UK economy from Brexit, it will hit Scotland too.
And that would not be a good time to have an independence referendum.
Trying to win a second referendum while there is uncertainty over the UK negotiations on leaving the EU would, say some in the SNP, be very, very difficult.
Scotland would be trying to join a club that the rest of the UK would be trying to leave.
And then there is the major unresolved issue that the constitution is still a matter for Westminster. Could the SNP even call a referendum legally?
Others in the SNP though take a more gung ho approach. They will relish the prospect of a UK government in turmoil. What better a backdrop for indyref2, they will think.
To use words once uttered by former Scottish Labour leader Wendy Alexander of a Scottish referendum, the attitude from these SNP optimists would be "bring it on".
Those in this camp will see a divided Tory party, a divided Labour party, and an unprecedented constitutional crisis.
Up to now Ms Sturgeon has been seen to be on the cautious side of this argument. She may well still be, given the potential problems ahead.
For example, SNP strategist admit that in the independence strategists they did not have a good enough answer on currency.
What is the answer now? Use Sterling, which will be plunging, it appears? Join the Euro?
And that's just one, of many questions.
But as First Minister, Ms Sturgeon will have to have answers, the voters of Scotland will expect no less.