Brexit: What happens now?
The bill to hold a general election on 12 December has now received Royal Assent which means it is law.
It follows the confirmation of a Brexit delay until 31 January 2020 after the EU agreed to the UK's extension request.
Prime Minister Boris Johnson had previously said the UK would leave by 31 October "do or die". He has agreed a deal with the EU but the bill implementing it has been put on hold. It will now not progress before the general election.
MPs failed to back a motion on 28 October to call an early election - the third time they had done so.
Under the Fixed-term Parliaments Act, two thirds of all MPs - 434 in total - are needed to get an early election using that procedure.
- What is the Withdrawal Agreement Bill?
- What is Boris Johnson's new deal with the EU?
- What are the PM's election options?
However, on 29 October they backed a short bill to change the Fixed-term Parliaments Act. They rejected a Labour amendment to change the date of the election from 12 December to 9 December.
Only a simple majority was required. The bill passed the House of Lords on 30 October and received Royal Assent on 31 October.
What happens next on Brexit would depend on the outcome of that election.
Implement the deal
One option is to implement the Brexit deal that Boris Johnson has negotiated with the EU.
A new version of the Withdrawal Agreement Bill would have to be introduced in the new Parliament - and go back to the beginning of its passage through Parliament.
The aim would be to get the bill completed in time for Brexit on 31 January. This is the Conservatives' plan.
There could also be another referendum although it would certainly require a further Brexit delay.
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.
Labour, the SNP, The Independent Group for Change, Plaid Cymru and the Green Party all support having another referendum.
The default position will be that if no deal is passed by Parliament, the UK will leave the EU without one on 31 January 2020.
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.
Many politicians and businesses say this would damage the economy. Others say the risks are exaggerated.
The Brexit Party wants the UK to leave the EU without a deal, in what it calls a "clean-break Brexit".
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. If they didn't get a majority, they would support another referendum.