But it does not completely rule out a Halloween no-deal Brexit.
MPs vote for no-deal
Under the act – introduced as a bill by Labour MP Hilary Benn – Boris Johnson might have to request a Brexit extension on 19 October, pushing the deadline back to 31 January 2020.
But there are two scenarios in which he would not have to do this:
- MPs approve a Brexit deal in another meaningful vote (remember them?)
- MPs vote in favour of leaving the EU without a deal
In either of these scenarios, Mr Benn’s law would not force any Brexit extension to be requested.
Could the government ignore the law?
The law states that it is the prime minister himself who would have to request an extension directly to the president of the European Council.
It even includes the exact wording of the letter.
So, theoretically, Mr Johnson could refuse to write or sign that letter. But that would almost certainly lead to court action.
There have been suggestions that Mr Johnson could follow the law by sending the letter – but send another letter setting out his political policy to leave on 31 October.
Foreign Secretary Dominic Raab said at the weekend the government would “adhere to the law” but “test to the limit what it actually lawfully requires”.
Could the government scrap the law?
With the current make-up of the House of Commons, the government would have little chance of repealing the new law.
But this could change if there is a general election before 19 October.
If an election returned a House of Commons with a majority for Mr Johnson, he could potentially scrap the law and carry on without requesting an extension.
Could the EU refuse?
Regardless of what UK law says, any extension to Brexit has to be agreed to by all the other 27 members of the EU.
It is possible that other European leaders are not convinced that they should grant the UK another delay.
French President Emmanuel Macron has been seen as a potential hurdle to any further Brexit delay.
Mr Johnson could also try to avoid an extension by persuading a member state to refuse his request.
What if the EU asks for a different date?
The new law sets the length of any further extension to three months.
But if the other EU states respond with a different date, Mr Johnson would be forced to accept it unless MPs vote to reject it within two days.
This was a point of controversy during the passage of the bill, because some MPs and peers argued it could effectively force the UK to agree to whatever the EU asks for.
If MPs were to reject an alternative date, the UK could end up leaving without a deal.
Could no deal happen in the future?
The new law tries to avoid a no-deal Brexit on 31 October, but it can’t rule out a no-deal Brexit in the future.
There are only two ways to do that: pass and implement a withdrawal deal or cancel Brexit altogether.