Image copyright UK Parliament/Jessica Taylor Image caption The Commons was bursting at the seams on Tuesday

Well, that was an extraordinary day in Westminster.

We've just about recovered enough to give you a summary of the key events.

1) PM suffers huge Brexit blow

We had to wait for the biggest moment of the day, but when it came it was certainly dramatic.

To a House of Commons bursting at the seams, tellers announced that MPs desperate to prevent the UK leaving the EU without a deal on 31 October had succeeded in wresting control of business away from the government.

That means they can introduce a bill on Wednesday that would force Boris Johnson to ask for a delay to Brexit until at least 31 January 2020 rather than take the country out with no deal.

The moment of victory was greeted with cheers, clapping and a shout of "Not a good start, Boris!"

Immediately afterwards, Mr Johnson said he would now press ahead with efforts to call a general election in October, telling the Commons: "The people of this country will have to choose."

As an aside, in the middle of all of the night's drama, an image of Jacob Rees-Mogg - Leader of the Commons and voice of the government during the debate - lying down on the front bench went viral. Expect to see it quite a lot in the coming days.

2) The government loses its working majority

Media playback is unsupported on your device Media caption The moment Tory MP Phillip Lee defects to Lib Dems

It was Boris Johnson's last opportunity to plead with the whole House of Commons to support his Brexit stance - but within moments of taking to the despatch box, the prime minister's thunder was well and truly stolen.

One of his MPs, ex-justice minister Phillip Lee, crossed the floor to join the Liberal Democrats.

In doing so, the government's paper-thin majority became non-existent.

His decision was greeted with cheers on the opposition benches. The MP for Bracknell, who is against a no deal, said the government was "pursuing a damaging Brexit in unprincipled ways", putting lives and livelihoods at risk.

Of course, things got even worse when 21 Tory MPs rebelled against the government - Downing Street later confirmed they would be expelled from the parliamentary party.

3) Ex-chancellor lets rip

Media playback is unsupported on your device Media caption Philip Hammond told Today he "is going to defend" the party from "incomers" and "entryists"

Once derogatorily labelled "Spreadsheet Phil", former Chancellor Philip Hammond has gone from loyal minister to leading rebel in barely six weeks.

On Tuesday morning, he made clear just how angry he was with his party's leadership, attacking what he called the "rank hypocrisy" of Downing Street when it came to Brexit loyalty.

He questioned how the Tory whips could, with a straight face, threaten no-deal opponents like him with expulsion from the party given how many current ministers had previously defied Theresa May on the same issue.

Mr Hammond also made clear he would not be going quietly if he was indeed expelled - indeed he said Number 10 would have "the fight of a lifetime" on their hands.

"This is my party. I have been a member of my party for 45 years, I am going to defend my party against incomers, entryists, who are trying to turn it from a broad church into a narrow faction," he added.

4) Courtroom revelations

Image copyright PA Media Image caption Pro-EU demonstrators gathered outside the Court of Session in Edinburgh

Away from Westminster, Brexit was the subject of fairly explosive court proceedings.

A cross-party group of parliamentarians wants Scotland's highest civil court to rule that Boris Johnson acted illegally and unconstitutionally by suspending Parliament.

On Tuesday, the court was told that Mr Johnson appeared to have approved the controversial plan two weeks before publicly announcing it.

This certainly raised a few eyebrows, but the government's lawyer argued that suspending - or proroguing - Parliament was a political decision for the government, rather than a legal matter for the court to decide.

Elsewhere in matters legal, Brexit campaigner Gina Miller received a shot in the arm for her efforts to bring a similar challenge when the High Court gave former Conservative Prime Minister Sir John Major permission to add his weight to it.

5) More Tories call it quits

Never mind the threat to deselect any Tory MPs who rebel, the list of those taking matters into their own hands by saying they won't stand at the next election grows longer by the day.

On Tuesday morning, Justine Greening - MP for the overwhelmingly Remain-voting London constituency of Putney - said she would bow out.

She accused Mr Johnson of offering voters a "messy" general election that forced them to choose "no deal or Jeremy Corbyn", and said she believed she could be more of a force for good outside Parliament than inside it.

Later in the day, well-liked and highly-respected former minister Alistair Burt followed her lead after 18 years as an MP.

He blamed "a fundamental, and irresolvable disagreement with our party leadership on the manner in which we leave the EU."

Conservative Keith Simpson also announced he would not stand again, but blamed age - he's 70 - not Brexit.

What questions do you have about the latest Brexit developments?

Use this form to ask your question: