UK Prime Minister Boris Johnson is quickly running out of options after opposition parties agreed to veto his request for an October election.

The agreement means that Johnson is likely to soon face a choice between breaking his promise to take Britain out of the European Union by the end of October or stepping down as prime minister.

Johnson's resignation would leave opposition parties the opportunity to appoint a caretaker prime minister who would be charged with delaying Brexit before calling a general election.

Visit Business Insider's homepage for more stories.

Boris Johnson could soon be forced to resign as prime minister. Here's why.

Johnson became prime minister in July on a promise of taking the UK out of the European Union on October 31 with or without a deal.

But last week that plan collapsed after opposition members of Parliament passed a law designed to force Johnson to seek a three-month delay to Brexit.

Johnson immediately tried to overturn this by forcing an early general election before Britain's planned exit date. However, opposition parties will on Monday vote to veto Johnson's request when he makes it for a second time.

This means that Johnson's plan has all but run out of road and he is likely to soon face a simple but terrible choice between two options — neither of which is good.

1. Break his promise to deliver Brexit on October 31

Opposition members of Parliament last week passed a law which when it receives royal assent on Monday will force whoever is prime minister on October 16 to request a three-month delay to Brexit.

Without an early election, Johnson has no hope of overturning this law — meaning that if nothing else changes he would be legally obliged to break his promise to take Britain out of the EU, "do or die," on October 31. Doing so would risk a collapse in his support among Brexit voters and could even lead to a leadership challenge within his party.

Because of this risk, Johnson has repeatedly insisted that there are "no circumstances" under which he would seek a delay to Brexit, saying on Thursday that he would sooner "be dead in a ditch" than comply with the law.

Some Downing Street sources have suggested in recent days that the prime minister could simply break the law. However, the Attorney General and other senior ministers have insisted the prime minister has now assured them he will not do this. This means he really has only one other option.

2. Resign as prime minister

If opposition parties refuse to give Johnson an October election and if he decides he cannot break his promise to deliver Brexit, then Johnson very quickly runs out of other options.

Last week, one senior minister told The Times that under those circumstances Johnson would opt instead to resign as prime minister. His official representative on Friday repeatedly refused to rule this out when asked by journalists at a regular briefing in Parliament.

As even the Conservative commentator Paul Goodman points out on Monday: "If there is an escape from this trap other than resignation, we would love to know what it is."

Under this scenario, Johnson would step down and make way for opposition parties to form a government instead. Because of the defection of Conservative MP Phillip Lee and Johnson's decision to oust 21 Conservative members of Parliament last week, the prime minister no longer has a working majority in the House of Commons.

If Johnson did resign, the queen would have little choice but to look to opposition parties to try to form a government. Johnson would then become the leader of the opposition, and a new prime minister — drawn from the opposition — would take over.

A caretaker prime minister takes over

Jeremy Corbyn. Getty

As the leader of the largest opposition party, Jeremy Corbyn would then be best placed to lead this caretaker government.

Other opposition parties are reluctant to make him prime minister even temporarily. But they could, in theory, agree to do so if he committed to calling an election as soon as he secures an extension to Brexit, as he has already offered to do.

Alternatively, Corbyn could agree to allow another opposition politician to fill the role.

This would be an utterly extraordinary series of events and in ordinary times would be dismissed as mere fantasy.

However, these are not ordinary times, and such an outcome could work for both Johnson and Corbyn.

For Corbyn, this scenario would allow him to prevent a no-deal Brexit and potentially become prime minister, before going into a general election in which he would hope to win.

For Johnson, it would allow him to avoid breaking his promise while blaming Labour for the Brexit delay. He would also then be in a good position to win the next election.

So could this be where the UK ends up in the next few weeks? We will find out very soon.