Prime Minister Boris Johnson has no choice but to request for Brexit to be delayed for a third time at the end of October.

Hopes of a deal with the European Union before the Brexit deadline have evaporated.

This means that Johnson must either resign as prime minister or request a delay by October 19 under the terms of a law enacted last month.

Everything we know suggests he will accept another delay rather than hand over the keys to Downing Street.

Visit Business Insider's homepage for more stories.

Later this month, Prime Minister Boris Johnson will write to the European Union requesting a delay to Brexit beyond October 31.

We know this for two incontrovertible reasons.

1. UK law compels him to request a Brexit delay

Last month, members of Parliament passed a piece of legislation known as the Benn Act, designed to compel the prime minister to seek an extension to the October 31 Brexit deadline if he failed to agree to a deal with the EU by October 19.

That date is less than two weeks away, and there is so far very little sign of either the EU or the UK getting anywhere close to a deal.

Read more: The scandals that could force Boris Johnson to resign as prime minister

Johnson's latest proposals have been dismissed by the Irish government, other European leaders, and multiple senior EU figures in Brussels.

A senior UK government source said on Tuesday that a deal with the EU is now "impossible."

So if there's no deal by October 19, the provisions of the Benn Act will kick in.

Under its terms, Johnson must write a letter to the president of the European Council, Donald Tusk, requesting a delay until 11 p.m. GMT on January 31.

Thanks to the act, we even know what the letter will say:

Dear Mr President,

The UK Parliament has passed the European Union (Withdrawal) (No. 2) Act 2019. Its provisions now require Her Majesty's Government to seek an extension of the period provided under Article 50(3) of the Treaty on European Union, including as applied by Article 106a of the Euratom Treaty, currently due to expire at 11.00pm GMT on 31 October 2019, until 11.00pm GMT on 31 January 2020.

I am writing therefore to inform the European Council that the United Kingdom is seeking a further extension to the period provided under Article 50(3) of the Treaty on European Union, including as applied by Article 106a of the Euratom Treaty. The United Kingdom proposes that this period should end at 11.00pm GMT on 31 January 2020. If the parties are able to ratify before this date, the Government proposes that the period should be terminated early.

Yours sincerely,

Prime Minister of the United Kingdom of Great Britain and Northern Ireland

In recent weeks, the British press has carried multiple briefings from anonymous UK government sources suggesting that Johnson will somehow get out of sending this letter or find some other means of sabotaging it. However, there is zero evidence to suggest that he can or will.

Indeed, far from committing to breaking the law, everything Johnson and his government have said on the record suggests that he will comply with it.

2. Johnson has already said he will send the letter

In recent days, Johnson has insisted on Twitter that there will be "no delay" to Brexit, and anonymous sources in the government have continued to insist that a delay will somehow be averted.

However, there is a very simple and obvious reason these briefings are made anonymously: They just aren't true.

As Johnson's own government lawyers acknowledged in a submission to a Scottish court last week, if no deal is reached by October 19, he will have no choice but to send the letter.

Read more: Boris Johnson told to resign following Supreme Court defeat and become the 'shortest-serving prime minister ever'

Johnson's lawyers said the prime minister would comply with the act and write to Tusk. A Scottish court on Monday also confirmed that it fully expects the prime minister to follow the law.

Of course, the prime minister could still break both his word and the law and refuse to request a delay. However, even if he did attempt this, the UK Supreme Court would inevitably intervene to ensure that he complied with his legal responsibilities.

There is also still a chance that the EU will refuse an extension. However, everything that the Irish government and other EU leaders have said in recent weeks suggests that this is unlikely. If Britain does end up leaving the EU without a deal, European leaders want that decision to be one taken wholly by the UK.

Johnson must either delay Brexit or resign

European Council President Donald Tusk and Johnson. Getty

Johnson has insisted that he would "rather be dead in a ditch" than delay Brexit and that there are "no circumstances" under which he would request a delay.

However, when push comes to shove, everything we know about the law and what Johnson's own legal team has said he will do suggests that next week he will break this pledge and request that Britain's exit from the EU is delayed for a third time at the end of October.

The only other alternative would be for him to resign as prime minister and allow Jeremy Corbyn or whoever else is able to form a caretaker administration to step in and delay it for him.

Read more: Boris Johnson could soon be forced to stand down as prime minister to make way for Jeremy Corbyn

As things stand, that looks unlikely.

Instead, Johnson is much more likely to cling on and hope that he can blame his opponents for any delay before going into a general election with the aim of winning a new majority in the UK Parliament.

The latter, ultimately, is the prime minister's main priority, and all the spin coming out of Downing Street to the contrary says a lot more about Johnson's attempts to spread the blame for a Brexit delay than it does about any serious attempt to prevent it.