Queen Elizabeth is accepting the resignation of Prime Minister Theresa May and is inviting a new prime minister in her place, Boris Johnson, to hold this high office and to form a government. She is doing this on the advice of her counsellors and on the assumption that he can maintain a majority in the House of Commons in support of his new administration and its main policies.

Since his party, the Conservative Party, only has a majority of three in the House of Common, and even that only when supported conditionally by a small ally, the Democrat Unionist Party of Northern Ireland, this is quite a brave assumption. It looks even braver when it appears that at least a dozen of his own party are poised to oppose one of his key policies — namely to allow the United Kingdom to cease being a member of the European Union on Oct. 31, even if no orderly arrangements, based on a properly negotiated deal between the U.K. and the EU authorities in Brussels, have been agreed.

The test on this will come not immediately, because Parliament now goes into recess for a month, returning Sept. 3. At any moment from then on Johnson’s government, his prime ministership and his tiny majority could be challenged.

If he is still set insistently on the course of exiting from the EU on Oct. 31, and if he has secured no new kind of deal or agreement with the rest of the EU on an orderly and disruption-free transition (and yet still rejects the elaborate one negotiated by May) then he will lose what majority he has and his “new” government will be at an end.

A general election will almost certainly follow to establish whether any other party, or coalition of parties, can sew together a majority stable enough and large enough to sustain a government under a new leader — whom the queen would then invite to take office. That new leader would not necessarily be the current head of the Labour opposition, since that party, too, is riven with divisions.

Johnson will be saved from this fate only if he can hold his own party together. And his own side will only hold together if he has some realistic plan to avoid the disruption, both economic and political, that would follow from just walking out without any plan at all on that October date.

How big that economic upheaval would be, and how long it would last, is a matter of vehement dispute. Some say it would be massive — not least some of the U.K.’s many Japanese investors — others that it would be brief and manageable.

But it is the political impact that could be even greater. This is because the Republic of Ireland would immediately find itself having to defend the physical frontiers of the EU at its border with Northern Ireland, by then outside the EU, and because Scotland — which never wanted to leave the EU in the first place — might finally take the plunge and vote for independence from Britain. So there could be both renewed violence in Ireland, at the unavoidable installation of a hard border, as well as the prospect of U.K. breakup.

Given such chaotic and momentous dangers, Johnson’s own party (along with the rest of Parliament) will simply split and fail to support his policy.

Only if Johnson then did a miraculous turn-about, and agreed to seek a further Brexit delay after Oct. 3, might he in theory survive. But as he has proclaimed that leaving on or before Oct. 31 is a matter of “do or die,” the “die” prospect for his premiership would in practice be the only one left.

This continued turmoil can be avoided only if Johnson somehow comes out with a plan, a “no deal deal,” so to speak. At the core of that plan would have to be an arrangement with the Republic of Ireland to swiftly work out a method of coexistence with Northern Ireland that involved no physical or visible border between the two parts of the island of Ireland and yet protected the integrity of the EU as a whole.

It can be done, as various customs and control systems in operation at sovereign borders round the world show, but it would take time to work out and demand a great deal of trust — between London and Dublin, and between the rest of the EU and the U.K.

Can such trust be generated by Johnson, especially after the many rough things he has had to say about both the Irish and about the European Commission in Brussels? And can the commission soften its stance about the Irish border, as some member states are now urging it very belatedly to do?

“Softening” would involve agreeing to postpone the complex details of managing an “invisible” border until a future date after the October Brexit, since there is now no time left before that date to settle anything before October with the commission, which has just been reconstituted with a new team, and a new head, and does not meet for business until autumn.

In the meantime, as from the morning of Nov. 1 there would have to be some kind of agreed transition or standstill, allowing trade with the EU to continue smoothly, to give time for the new arrangements for the Irish border and numerous other things to be settled and a final comprehensive modus vivendi between the U.K. and the EU to be worked out.

It is all just possible, but very high risk. It is equally possible that Johnson and his team will fall and that Brexit will be delayed once again while the battles and the arguments continue under yet another government and another prime minister.

David Howell is a Conservative politician, journalist and economic consultant. He is chairman of the House of Lords International Relations Committee.