A new version of the Brexit deal has been agreed between the EU and UK.
For the first time this century, MPs sat in the House of Commons on a Saturday to debate it.
The new deal replaces the Northern Ireland backstop with special arrangements for Northern Ireland that will prevent a hard Irish border.
There is also a new political declaration, which sets out proposals for the long-term future relationship between the UK and the EU.
A key amendment from MP Sir Oliver Letwin has passed. It means that any support MPs give to the Brexit deal is withheld until legislation to implement the deal has been passed by MPs and Lords.
Mr Johnson has now – compelled by the so-called Benn Act – sent a letter to the EU to request a three-month delay to Brexit.
But Mr Johnson did not sign the letter. He then sent a follow-up one, which he did sign, saying that he does not think there should be an extension.
Leader of the House of Commons Jacob Rees-Mogg has said the government plans to hold a meaningful vote on Monday. It’s not clear whether the Speaker will allow that to go ahead – he could rule it would be out of order.
Another option is for the government to press ahead with legislation to implement the deal next week. That could also remove the need for a separate meaningful vote.
The EU will now consider Mr Johnson’s letter.
All 27 EU nations must agree to an extension. The EU does not have to give an immediate answer.
If the EU refuses to grant the UK a delay to Brexit, then Parliament has until 31 October to pass a deal and the associated legislation.
No-deal Brexit on 31 October
The default position is still that the UK will leave the EU on 31 October at 23:00 GMT.
And if MPs vote in favour of the deal, but the subsequent implementation legislation does not pass, the UK would leave without a deal on 31 October.
Leaving without a deal (or withdrawal agreement) means the UK would immediately exit the customs union and single market – arrangements designed to make trade easier.
An early election is widely expected after 31 October when Brexit is currently scheduled to happen. It’s unclear, though, whether that would be later this year or early next year.
If Brexit is delayed, the House of Commons might be asked again by the government to back an early general election. That requires a 2/3 majority in the House of Commons and so far MPs have not been prepared to agree.
An alternative route for the government would be a short new law specifying the date of an early general election – this would require only a simple majority and not need two-thirds of MPs.
There is another much more dramatic way – the prime minister could call a vote of no confidence in his own government.
Vote of no confidence
At any point the opposition could call a vote of no confidence in the government. Labour leader Jeremy Corbyn has previously said he would table such a motion.
If more MPs vote for the no-confidence motion than against it, there would then be a 14-day window to see if the current government – or an alternative one with a new prime minister – could win a vote of confidence.
If no-one does then a general election would follow.
There could also be another referendum although it would certainly require a Brexit delay and, most likely, a change of government first.
The referendum could have the same legal status as the one in 2016. It would be advisory, and the government would have to decide how to respond once the result was known.
An alternative would be to hold a so-called “confirmatory” referendum. That would be between a particular Brexit deal and remain – or possibly with no deal as an option. The result of this kind of referendum would be legally binding.
Either way, the new referendum would require legislation to be held. There would also have to be time for the Electoral Commission to consider the question wording – especially if it’s a referendum with more than two options.
Experts at the Constitution Unit at University College London say it would take a minimum of 22 weeks.
There is also the legal option of cancelling Brexit altogether by revoking Article 50.
But clearly, this is not something the current government is contemplating – so it’s only really possible to imagine this outcome after a change of government.
The Liberal Democrats have said that if they won a majority in the House of Commons they would revoke Article 50 and cancel Brexit.