The prime minister suffered the worst defeat in the House of Commons in more than 100 years on Tuesday as MPs categorically rejected her plan on how to take the UK out of the European Union.

And on Wednesday MPs will decide whether they have confidence in her government to carry on.

The humiliating rebuff was delivered in the House of Commons just moments after the prime minister made a last-ditch appeal for MPs to back the Withdrawal Agreement which she sealed with Brussels in November after almost two years of negotiation.

The 230-vote margin of defeat was by far the worst suffered by any government in a meaningful division since at least the First World War and in normal circumstances would be enough to force a prime minister from office.

But there was little doubt in Westminster that Mrs May would hang on - and was likely to survive a motion of no-confidence tabled by Labour leader Jeremy Corbyn.

Protesters outside the House of Commons in London as MPs debate the Prime Minister's Brexit deal. Photo: Jonathan Brady/PA Wire

Keith Simpson, Conservative MP for Broadland, said he had never been in the chamber when the press gallery and the gallery for the Lords was so packed - and when he spoke to Mrs May in the Commons he praised her “grit and determination”.

He said he was not surprised by the numbers voting against the deal but that Mrs May was prepared for that and so he said: “On the main motion it was a sort of damp squib.”

He admitted it was a hefty defeat for Mrs May but said: “In a strange way very little else has actually changed.”

Clive Lewis, Labour’s Norwich South MP, said the government had not just been defeated but “completely and utterly routed”.

Protesters outside the House of Commons in London as MPs debate the Prime Minister's Brexit deal. Photo: Jonathan Brady/PA Wire

Mr Lewis called for a general election on Twitter and later told this newspaper: “It was high pantomime and there was a sense of history. You can’t take a battering like that in parliament without there being consequences.”

He said there would be lots of eyes on today’s no confidence vote but he was loath to predict how it would go, but that Mrs May’s speech calling for reconciliation prior to the vote had come 30 months too late.

“The one thing I know about Brexit, is the only thing they’ve guessed right is the defeat,” he said.

Richard Bacon, Conservative MP for South Norfolk was one of the rebels who voted against the government but he would support Mrs May in Wednesday’s vote.

Labour leader Jeremy Corbyn speaks after Prime Minister Theresa May lost a vote on her Brexit deal in the House of Commons, London. Photo: House of Commons/PA Wire

“But after that there’s the question of what the government does next,” he said. “They plainly will go back to the EU and say we need something and if the EU were rational there would be some form of accommodation. But they’ve wanted to make sure it’s a punishment Brexit.”

Mr Bacon said he saw the two most likely options as the EU conceding some ground or the country leaving with no deal.

However he added he did not feel leaving without a deal would be a problem.

Chloe Smith, Conservative MP for Norwich North, added: “There’s a lot of difficult work ahead to find consensus and make a success out of Brexit. Personally I will stay focused on what will deliver the referendum and support jobs and prosperity for my constituents.”

Prime Minister Theresa May listens to Labour leader Jeremy Corbyn speaking after losing a vote on her Brexit deal in the House of Commons, London. Photo: House of Commons/PA Wire

Alex Mayer, Labour MEP for the East of England tweeted: “That was a defeat of epic proportions. The deal is dead. The clock has run down. Now we face a stark choice - no deal or no Brexit. It is time for the Government to urgently revoke Article 50 and call a people’s vote.”

While George Freeman, Conservative MP for Mid Norfolk, warned: “The 100 hardline Brexiteers who just voted against EU withdrawal just made the customs union they understandably reject, much more likely.”

He later added: “The ERG tonight [acted] like kidnappers itching to fire the gun, but just shot the hostage.”

There were muted cheers outside parliament as Mrs May’s deal was defeated.

An anti-Brexit campaigner outside the Houses of Parliament, London, following the House of Commons vote on the Prime Minister's Brexit deal. Photo: Jonathan Brady/PA Wire

Crowds of protesters on both sides of the Brexit divide had gathered on College Green throughout the day to await the outcome of the vote.

But many of them had left by the time the vote took place. The majority of those present wanted to see Mrs May’s deal voted down.

The exchange was peaceful, although police and security staff were present.

One group of remain protesters kept up a steady racket with a bell and a bass drum they dubbed The Liberty Bell with the words Save Our Sovereignty above it.

Pro-Brexit supporters outside the Houses of Parliament, London, following the House of Commons vote on the Prime Minister's Brexit deal. Photo: Jonathan Brady/PA Wire

Brexiteer David Hurlibut, 62, from Ipswich, said: “It’s not being true to the referendum. We may as well stay in the EU.”

In nearby Parliament Square a platform and two screens were set up by those campaigning for a people’s vote.

A float with a sculpture of Mrs May, Boris Johnson, Michael Gove and David Davis with the words “Brexit is a monstrosity” circled the area.

The demonstrations ahead of the vote were calm, although a small number of “gilets jaunes” protesters verbally abused police, calling them “EU Police” and “EU fascists”.

MP Keith Simpson Photo: Colin Finch

A No 10 spokesman said they hoped to open talks with other MPs as “swiftly as possible” once the vote of confidence was out of the way.

“We want to identify what would be required to secure the backing of the house consistent with what we believe to be the result of the referendum,” the spokesman said.

“We want to leave with a deal and we want to work with others who share that.”

The spokesman declined to be drawn on whether they would include Mr Corbyn.

Norwich South MP Clive Lewis. Photo: PA

“Let’s not pre-empt talks before they have happened. We will look to engage widely with people we believe share our objectives.”

After Theresa May’s embarrassing defeat on Tuesday night, the government has three working days to produce an alternative plan - Mrs May has promised this by Monday. But what could happen next?

Alex Mayer MEP. Picture: Courtesy of Alex Mayer

• No deal - if nothing else happens, this is the default position. The UK will leave the EU on March 29.

• Go back to Brussels - The government could try to negotiate a new deal, but it would have to be a major overhaul to appease MPs and would likely require an extension of Article 50. The EU has signalled it would not re-enter negotiations.

• Early general election - Mrs May could decide to hold an early general election to try to break the deadlock. She would have to ask MPs to vote for it, and two thirds would need to support it. But it would also involve an extension of Article 50.

• Vote of no confidence - Labour have tabled a vote of no confidence in the government. This could lead to an election or a change of government.

• Another referendum - The government could decide a second referendum would settle the vote.

• End of Mrs May - The prime minister could choose to resign, triggering a leadership election, or MPs could pass a censure motion against her.