Only once since 1945 has a British prime minister been evicted as a result of a successful no-confidence vote in parliament. That was on 28 March 1979, one of the most dramatic nights in modern parliamentary history. After many months of struggling for its life, Jim Callaghan’s battered minority Labour government faced a confidence vote brought by the Conservative leader, Margaret Thatcher. It was nerve-shreddingly close. The Callaghan government lost by just one vote. Once the tellers for each side had marched up in front of the Speaker and read the result, there was uproar, during which Tories cheered with delight and some Labour leftwingers sang The Red Flag. Callaghan then got up to the dispatch box to make a brief and dignified statement in which he declared “we shall take our case to the country” at an election that he promised to hold “as soon as possible”. This would be an election that Callaghan had concluded, rightly, that he was going to lose.

In strict law, he didn’t have to do that. The requirement that an election must be called by a government that has lost a confidence vote was “a firm convention” rather than solid legislation, as are the understandings that a government won’t unreasonably delay an election and will not do anything contentious once a campaign is under way. When people refer to the British constitution, they are talking about a hotch-potch of such conventions, combined with ancient charters, precedents, international agreements, legislative bolt-ons and unwritten understandings. The fabric of this messy tapestry is held together by a crucial thread. That is an underlying assumption that everyone can be trusted to behave in a proper way. In the absence of a formal constitution, British democracy is heavily reliant on politicians acting with honour and playing fair.

What if they don’t? What happens then? We may be about to find out if Boris Johnson faces a no-confidence vote this autumn, loses, refuses to quit as prime minister and barricades himself in Number 10 for long enough to force through a no-deal Brexit before an election can take place. This is a scenario so grotesque as to be scarcely believable. That doesn’t make it an impossible one.

The suggestion that they could take this sensationally reckless course seems to have originated with Number 10’s de facto chief of staff, Dominic Cummings. Some regard him as the second most powerful person in this government and others suggest he is the most powerful. I don’t know about that, but I do know that a man who has been held in contempt of parliament is no respecter of conventions. He reportedly told a meeting of special advisers that the mission of this government is to take Britain out of the EU on 31 October “by any means necessary”. That’s a phrase loaded with menace because it was made notorious by Malcolm X to suggest that anything was justified, including violence, in the pursuit of justice for black Americans. I am sure Dom X is not advocating violence of the physical variety, but it does suggest that he might not be averse to inflicting GBH on constitutional norms. This would apparently include Boris Johnson refusing to leave Number 10 even if his government lost a Commons no-confidence vote, and turning himself into the world’s most extraordinary squatter in order to delay polling day until after 31 October. That would make it impossible to stop a crash-out Brexit in the middle of an election campaign, possibly even on election day itself, and even if the country was about to vote for a different outcome.

Now it is possible that Dom X has put this out as a piece of misdirection. It could be an elaborate feint from a government composed of many bluffers. Putting this threat into circulation might be intended to convince MPs, especially dissident Tories, that it won’t get them anywhere if they try to prevent a no-deal Brexit by voting to collapse the Johnson government. It could also be part of the scheme to convince European leaders that they can’t rely on the British parliament being able to stop a no-deal Brexit, so they had better offer some concessions if they want to prevent a crash-out that will hurt them as well as Britain. Sham it could be, but it will be best to prepare for the possibility that Mr Johnson could try this one on and to remember that some threats start out as a bluff, only to end up becoming a reality.

Facebook Twitter Pinterest What happens if Boris Johnson faces a no-confidence vote this autumn, loses, refuses to quit as prime minister and barricades himself in Number 10? Photograph: WPA Pool/Getty Images

A calamity Brexit will be difficult. No one can say with certainty whether it will be merely rough or utterly catastrophic, but even members of this Brexiter-dominated cabinet acknowledge that there will be what they coyly describe as “bumps in the road”. It will be astonishingly dangerous if Britain is driven down this perilous highway by a prime minister installed without reference to the country, who has lost a confidence vote and timed a no-deal Brexit for the middle of an election campaign when senior politicians will be on battle buses, the civil service parked in neutral and the identity of the next government unknown.

How could such a hideous mockery of democracy even be possible? Here we must take a deep breath and dive into the murky waters of the Fixed-term Parliaments Act of 2011. That title gives this legislation a patina of solidity that is very misleading. This law, invented during the coalition years as a mechanism to lock the Tories and Lib Dems into their partnership, is full of voids and ambiguities. It is a superb example of an important constitutional change being improvised into existence without thinking through all the potential consequences. If a government loses a confidence vote, the law allows 14 days for either the prime minister to regain a Commons majority or for someone else to assemble one. If no one can, there is then an election, the date of which is to some extent set at the prime minister’s discretion. The law is mute on whether Mr Johnson is entitled to hole himself up at Number 10 during that fortnight and time the election so that Britain will have crashed out of the EU before the people get to vote. Labour has called this “an abuse of power” and asked the cabinet secretary to give an opinion. Sir Mark Sedwill is thought to agree that it would be an abuse, but even if he did make that ruling, it is not clear how he could enforce it.

John McDonnell has suggested that Jeremy Corbyn will simply oust Mr Johnson by asserting a right to form a Labour government. The shadow chancellor’s cunning plan is to hail a taxi. “I would be sending Jeremy Corbyn in a cab to Buckingham Palace to say ‘we’re taking over’.” That would be a wasted fare. The Queen’s officials would tell Mr Corbyn that, much as she enjoyed their last chat about his allotment, he only becomes prime minister in these circumstances if he can demonstrate that he commands a majority in the Commons.

The other suggestion, on which the Lib Dems are especially keen, is that some as yet unidentified senior MP should take over at the head of a multiparty “letter-writing government”. This would be formed for the sole purpose of asking the EU to delay Brexit until Britain has held an election. The EU would almost certainly grant such a request since it has said that there can be a postponement for “a democratic event”. The trouble with a “letter-writing” government is that putting it together would be like trying to resolve Rubik’s Cube while blindfolded. Before he advised her to appoint a new prime minister, the Queen’s private secretary would want to be utterly confident that the chief letter-writer could command a Commons majority. Labour is insistent that any alternative government must have Mr Corbyn as its leader. There is no conceivable parliamentary majority for installing him at Number 10, even on a temporary basis. There are other things MPs can do if they have the will and the numbers, though none is easy and some would be political dynamite. They could take control of parliament’s agenda in order to declare a revocation of article 50. They could rush through changes to the relevant laws to ensure that an election happened before 31 October.

All possible solutions depend on there being sufficient Conservative MPs capable of remembering that Britain’s democratic fabric relies not so much on laws as assumptions that people will behave properly.

The word unprecedented is overused, but not in this case. If Britain crashes out of the EU in the middle of an election campaign deliberately delayed by a prime minister with no mandate, it won’t just be the constitution that will be plunged into the darkest crisis of our modern history.

• Andrew Rawnsley is the Chief Political Commentator of the Observer