It’s the morning after the European referendum.  The Prime Minister and his team are in Number 10 watching the results come in.  After the first few returns, they begin popping the champagne corks to celebrate.  The Prime Minister declares on television that the great national debate is over.  The most outspoken Eurosceptic in his cabinet concedes in public saying that when the British people have spoken, Parliament should tremble before their decision.

This is not make-believe.  It really happened.  In 1975.

It doesn’t look as though this bit of history is going to be re-run.  The result that Mr Wilson and his team celebrated was a vote for in, by a margin of 67% to 33%.

This time it looks very different.  The last five on-line polls give an average Remain vote at 39.6% with Leave at 40.8%.  The last five phone polls (considered more accurate) give an average Remain vote at 48.2% with Leave at 42%.

The polls may not be getting it entirely right (in either direction) and there are still several weeks to go.  The biggest nightmare for Mr Cameron is that Leave wins.  That, in all probability, is the end of his premiership.  His next worst nightmare is that Remain wins, but only just.

A win for remain by 10 percentage points or less brings perils for the Prime Minister.

As the Scottish referendum showed, a narrow result cannot be guaranteed to close down the argument; and can have a dramatic effect on subsequent voter preferences.  For as long as eurosceptics feel that their cause could have won, had it not been for Mr Cameron and his £9 million leaflet drop, or his (expected) barnstorming final campaign swing across the media, there will be a stockpile of resentment awaiting him after June 23.

There will be a potentially toxic mix of 50 or so angry Tory backbenchers, a handful of frustrated cabinet colleagues, a bitterly disappointed chunk of the Conservative electorate, and a group of Eurosceptic newspaper proprietors out for revenge.

Euroscepticism within the Conservative party runs deep, both in Parliament and outside.  The totally committed Eurosceptic MPs on the backbenchers are unlikely to pack up their tents, and those who are more acquiescently Eurosceptic are likely to feel the heat from frustrated local associations and from the core vote.

Decided voters who self-identify as right wing are currently breaking 64-36 for Leave, and the majority vote Conservative.  All voters over 65 are currently breaking 47-23 for Leave, and, again, the majority vote Conservative.  For core voters, and for a significant chunk of the Parliamentary party, quitting Europe has been a guiding light, if not a passion, since the latter days of Mrs Thatcher’s administration.  For them, Mr Cameron risks being the Tory Grand Old Duke of York.  While the hope of Brexit shone on the horizon they would follow him, but with it extinguished – just – they may well decide to follow no further.  Voters could take revenge at every opportunity, via abstention, or even by turning to UKIP.  MPs could take their revenge in the lobbies on a regular basis, doing everything they can to compromise the government’s programme.  All will be trying to hasten the Prime Minister’s departure.

Mr Cameron could find himself low on political capital. He shed plenty by pre-announcing his departure anyway.  But he may find it impossible to move eurosceptic challengers aside.  With eurosceptic resentment against him running so strong, he would only add fuel to the fire by dropping leading Eurosceptic ministers from his government.  An attempt at appeasing the eurosceptics by bringing one or two of their big hitters into his government would only confirm his difficulties.

This perilous prospect for the Prime Minister could all be avoided – by a big win for Remain.  Where the breakpoint lies between a win that counts for little politically and a win that yields real dividends is a tough call, but the margin would have to be over 10 points for sure and to be really certain would have to be edging closer to 20.

Only in those circumstances will there be any chance of a whiff of that 1975 satisfaction inside number 10 on the morning after.

Otherwise it’s going to be a case of either packing the boxes, or sipping some very flat champagne, and battening down for the storm ahead.