Media playback is unsupported on your device Media caption Brexit: What happened on Tuesday?

Boris Johnson will push for a general election if the EU agrees to delay Brexit until January, No 10 has said.

The PM "paused" his Brexit bill on Tuesday after MPs rejected his plan to fast-track it through Parliament.

Now EU leaders will consider whether to grant a delay to the 31 October Brexit deadline and what length it should be.

Mr Johnson was forced by law to send a letter the EU requesting a three-month extension but he insists the UK will still leave at the end of October.

Taoiseach (Irish prime minister) Leo Varadkar has confirmed he supports the proposal to grant the UK's request for a three month extension.

What happens now?

Mr Johnson may want a general election, but he cannot simply call one, as prime ministers did before the passage of the 2011 Fixed Term Parliament Act.

The move would need the backing of Parliament, and opposition MPs have previously ruled out holding one until the possibility of a no-deal Brexit on 31 October was ruled out altogether.

Justice Secretary Robert Buckland told BBC Breakfast that "regrettably it does seem that a general election is the only way to sort this impasse out".

His opposite number, Labour's Richard Burgon, told BBC Radio 4's Today programme his party would agree to a general election if the EU granted an extension because it meant a no-deal Brexit would certainly be "off the table".

Media playback is unsupported on your device Media caption Richard Burgon: I would like to see Boris Johnson gone by Christmas

There is also the option of a further referendum, although it would require a Brexit delay and, most likely, a change of government first.

However, Mr Burgon said holding a referendum before an election - a move favoured by some of his Labour colleagues - was "fantasy politics".

The SNP has indicated it wants an extension to allow for a general election, while the Liberal Democrats say the PM needs to get an extension to allow a further referendum. Both parties would rather the UK revoked Article 50 and stopped the Brexit process.

Some Conservative MPs say the government should take the Labour Party up on its offer to come up with a timetable for the Withdrawal Agreement Bill that satisfies all sides.

MPs voted to back the first stage of bill, which would enact Boris Johnson's deal, on Tuesday - the first time Parliament has expressed approval for a Brexit agreement.

They had been due to debate it on Wednesday and Thursday, but after voting against that timetable, they will instead discuss the contents of the Queen's Speech, which sets out the government's plans for the next session of Parliament.

There is a tension in the Tory party today - some would rather try again to get the bill through. Those MPs were cock-a-hoop at the fact they had managed to get 19 Labour MPs to cross the threshold to potentially back this kind of Brexit deal - even though that is a million miles away from it getting safe passage through Parliament.

But in the heart in Downing Street the instinct is: if a delay is agreed they throw everything into an election instead.

No 10's fear is, even if they say "maybe we could pass the bill in a fortnight," that delay might turn into a long one, tangling with Parliament and losing control of the timetable.

Just as Parliament doesn't trust the prime minister, the prime minister and his team don't trust Parliament.

Opposition parties have no interest really in helping Boris Johnson to complete the passage of this bill. They want to disrupt it for perfectly obvious and legitimate political reasons.

So as things stand, the prime minister would rather trigger an election... But it is not in his gift.

Read more from the BBC's political editor

What happened on Tuesday?

On Tuesday, MPs approved the Withdrawal Agreement Bill on its first hurdle through the Commons - called the second reading - by 329 votes to 299.

But minutes later Mr Johnson was defeated - by a majority of 14 - in a second vote on a fast-tracked timetable for the bill.

The prime minister insisted to MPs it was still his policy that the UK should leave the EU on Halloween, but acknowledged he would have wait to hear what other leaders said.

Following Tuesday's votes, Mr Corbyn said his party was prepared to work with the government to agree "a reasonable timetable" to enable the Commons to debate and scrutinise the Brexit legislation properly.

Media playback is unsupported on your device Media caption Jeremy Corbyn: MPs have "refused to be bounced"

EU Council President Donald Tusk said he would recommend European leaders backed an extension to the Brexit deadline, though he did not say what length it should be. He said he would "propose a written procedure", thus negating the need for another summit meeting.

If the EU accepts the UK request for a straightforward extension to 31 January 2020 then that becomes the new date of Brexit. If the EU proposes a date other than this, even a short "technical extension" of a few days, the prime minister must approve it unless a motion is put before MPs and they decide not to pass it.

If the EU were to reject any extension, that would give MPs a stark choice between Mr Johnson's deal and no-deal.

Will the EU agree to an extension?

Germany's Die Welt newspaper sums up EU thoughts on Brexit this morning with the headline: "The only thing that is clear is that Brexit is not happening on 31 October."

EU leaders must now agree on whether to grant the UK another Brexit extension and if so, how long for?

Don't forget every country has a veto on this. But after speaking extensively to EU diplomats and politicians, the consensus EU-side seems to be to say yes.

The EU's decision is expected by the end of the week, but you can expect a lot of EU grumbling beforehand. France's Europe minister was unsurprisingly (France has settled into role of "Brexit bad cop") one of first to speak on the record last night.

She noted that time alone wouldn't solve the UK's Brexit conundrum and the EU would want to hear UK's justification for another extension - i.e. what will be done with the time?

EU leaders are fully aware the PM's hand was forced by Parliament to request a three-month extension. Brussels does not want to get embroiled in heated UK debate, so it seems most likely it will say yes to that rather than "impose" their own "EU extension".

Whatever the time length of the extension granted, this will be another "flextension", meaning the delay can end earlier if and when Parliament ratifies the Brexit deal.

Read more from the BBC's Europe editor.

How could a general election happen?

Under the Fixed-term Parliaments Act, the prime minister needs to have the backing of two thirds of MPs to hold a snap poll. This has been rejected twice by MPs.

Another route to an election is a one-line bill, that requires only a simple majority.

But former Tory MP Ken Clarke told the BBC that any such bill was likely to incur a host of amendments, given Mr Johnson does not have a majority.

That included attempts to allow 16 and 17-year-olds to vote - something the government is likely to resist.

Media playback is unsupported on your device Media caption Buckland: It’s really good progress, but undeniably frustrating

There is also the option of a vote of no confidence in the government, something which Jeremy Corbyn says he wants but only once the threat of a no-deal Brexit on 31 October has been removed.

Mr Johnson could even call one in his own government, but Parliamentary rules state that if it passes, the Commons has 14 days to form an alternative administration, so the PM would run the risk of being forced out of Downing Street if opposition parties can unite around a different leader.

If an election were to be triggered this week, the earliest it could take place would be Thursday 28 November, as the law requires 25 days between an election being called in Parliament and polling day.

Many observers think a 5 or 12 December election is more likely - but in general, parties tend to prefer polls in lighter, warmer months when the perceived wisdom is that campaigning is easier and voters are more likely to turn out.