It is 10.01pm, 23 June. The polls have just closed. There is consternation in Downing Street that turnout is surprisingly low – well below not only the bookmakers’ prediction of roughly 80 per cent but even the more conservative estimate of a showing similar to the one in the 1975 referendum (65 per cent). It is just 48 per cent, and that has favoured Leave. Britain is out of the European Union.

What happens next? The expectation at Westminster is that David Cameron would have to resign as Prime Minister sooner rather than later, or at least announce a timetable for his departure. Boris Johnson would start as the favourite in the leadership race that would follow, though he would be vulnerable to tactical voting of the kind that kept Michael Portillo out of the top two on the third ballot in 2001, leaving Iain Duncan Smith and Kenneth Clarke to face the Tory party membership.

But a short, sharp contest of the kind that would most likely follow a Brexit vote would kill any hope of keeping Boris out of the final decision by members. The most dangerous group of MPs, as far as the “Stop Boris” caucus is concerned, is those who are bound to George Osborne by nothing more than expediency (the Chancellor has used his patronage wisely), rather than any great personal affection or political sympathy.

As Andy Burnham discovered during last year’s Labour leadership contest, the most unreliable grouping in any parliamentary party is the alliance of “MPs who want jobs”. Like nervous stock-market traders, these MPs would seek a safe haven – possibly Boris Johnson, though Theresa May will probably mount a challenge. The Conservative right is still fractured and without an obvious leader but would contribute at least one candidate, with Dominic Raab widely tipped to run and David Davis acting as his guarantor.

Yet that contest would probably be blown off course not by nervous MPs but by panicked financial markets. The expectation is that there would be an immediate plunge in the value of sterling if we voted to leave. There is division over how severe the effects of this would be. John Mills, Labour’s largest donor and a long-standing Eurosceptic, believes that the pound is overvalued, hurting exports and manufacturing. For some of the Brexit brigade, the drop in sterling – like the decision to abandon the gold standard in 1931 or Britain’s exit from the Exchange Rate Mechanism in 1992 – would be a brief period of pain that would give way to economic growth.

The Bank of England takes a rather different view. The Bank has a standing order not to “spread fear”; consequently, it is not allowed to ask the companies it oversees if they are worried about Brexit. But it also has a duty to make sure that those same bodies are adequately prepared for any potential shocks. So the Bank’s officials ask insurers, banks, credit unions and building societies: “What socioeconomic events do you view as a risk over the coming year?” The answers have made for unpleasant reading on Threadneedle Street.

The expectation at the Bank is that a Leave vote would trigger a sharp decline in the value of sterling and a period of heightened inflation. In that case, the expectation is that the Bank would have to increase the basic rate of interest, which has been held at 0.5 per cent for seven years.

That would trigger an immediate crisis in Britain’s housing market – several banks estimate that about one-third of buy-to-let landlords would be unable to pay their mortgages in the event of a 2 per cent rate rise. According to officials at the Bank of England, the true figure may well be higher, as many buy-to-let landlords have mortgages with multiple banks. Renters would face a toxic cocktail of rent rises, banks that were unwilling to lend even as house prices dropped, and homeowners stuck with mortgages greater than the equity in their homes, unwilling and unable to sell up – even if buyers could be found.

For David Cameron, the worse the immediate contagion, the better his chances of delaying his departure. He would be hoping to stay at least long enough to try to put a more positive gloss on his legacy than having taken the UK out of the EU by accident. Regardless of his notice period, however, Cameron would attend an emergency meeting of European leaders that weekend to discuss Britain’s exit.

There is a lively controversy between the referendum campaigns – and, indeed, between Downing Street and Cameron’s Eurosceptic opponents within the cabinet – about the point at which Article 50, the section of the Lisbon Treaty which covers exit from the Union, would be triggered. The government maintains it would be immediate. Dominic Cummings, Vote Leave’s combustible director of strategy, likened a swift use of Article 50 to “putting a gun in your mouth and pulling the trigger”.

However, the expectation in Brussels and Berlin is that a Leave vote would trigger exit talks almost instantly. One German official says that Chancellor Angela Merkel, having bent over backwards to keep Britain in Europe, would be in no mind to let uncertainty over the relationship carry on much longer, not while the EU is still grappling with the migrant crisis and Vladimir Putin’s revanchist intentions.

Once Article 50 was triggered, the terms of British exit would be negotiated not by British politicians or officials, but by the other 27 nations of the Union. Britain would find itself in the same position as the United Provinces of the Netherlands in 1713, when they were frozen out of negotiations to end the War of the Spanish Succession by the great powers of Austria, Britain, France, Portugal and Spain. The French diplomat Melchior de Polignac taunted the Dutch, saying that discussions would be “de vous, chez vous, mais sans vous” – “about you, in your own home, but without you”.

In the negotiating room would be many nations with no interest in giving Britain a good deal, either to discourage other countries from leaving the Union or, in the case of Germany and Ireland, because they would be casting hungry eyes at the City of London. There would be no appetite to have Europe’s largest financial sector outside the EU’s regulatory orbit. The exit deal is offered on a “take or leave it” basis, and would be the first item on the agenda for the new prime minister.

In that way, if no other, Cameron would find himself occupying the same role as Winston Churchill at Potsdam, where he attended the first few days of the postwar diplomatic conference before being replaced by Clement Attlee, who had just defeated him at the polls. Boris Johnson, the Prime Minister’s most likely replacement and a keen (if mercenary) soldier for Out, might be forgiven for wondering at that point what he had got himself into.