Theresa May has suffered a devastating defeat after MPs threw out her Brexit deal by a record majority of 230 in the long-awaited ‘meaningful vote’.

A total of 118 Tory backbenchers deserted the prime minister – ignoring her last-ditch appeal, in the Commons, to avoid “uncertainty, division and the very real risk of no-deal”.

Ms May announced immediately that she would make time for a vote of no confidence in her government on Wednesday, to “confirm” that MPs wanted her to continue in office.

And she pledged she would open talks on a way forward with “senior parliamentarians from across the House” – while insisting Brexit would still go ahead.

The prime minister said she wanted to test what ideas had “sufficient support”, before returning to Brussels for further negotiations with the EU.

The offer of cross-party talks came despite a cabinet meeting confirming a deep split between ministers urging her to fight on and others insisting she must pursue a compromise, to solve the crisis.

Minutes before the vote, Ms May made an impassioned plea for MPs to turn back from defeating her in “the most significant vote that any of us will ever be part of”.

The margin is greater than the record dating all the way back to 1924, when a Labour minority government suffered three defeats with majorities of 166, 161 and 140.

Just 202 MPs backed the government, which suggests fewer than 50 not on the ‘payroll vote’ of ministers, unpaid aides, or those with other official jobs.

Brexit deal vote: Opposing groups of protesters gather by parliament Show all 20 1 /20 Brexit deal vote: Opposing groups of protesters gather by parliament Brexit deal vote: Opposing groups of protesters gather by parliament Brexit supporters outside parliament PA Brexit deal vote: Opposing groups of protesters gather by parliament An anti-Brexit protester adjusts her pro-EU wig AFP/Getty Brexit deal vote: Opposing groups of protesters gather by parliament A message to Jeremy Corbyn in support of a people’s vote Getty Brexit deal vote: Opposing groups of protesters gather by parliament A mock Titanic captained by Theresa May heads towards an iceberg in a stunt by campaigning group Avaaz AP Brexit deal vote: Opposing groups of protesters gather by parliament Anti-Brexit protesters outside parliament PA Brexit deal vote: Opposing groups of protesters gather by parliament Protesters of opposing sides are in close contact outside of parliament PA Brexit deal vote: Opposing groups of protesters gather by parliament Paintings of Theresa May and Jeremy Corbyn Getty Brexit deal vote: Opposing groups of protesters gather by parliament Former Ukip leader Nigel Farage speaks to the media at the protests outside parliament Reuters Brexit deal vote: Opposing groups of protesters gather by parliament A pro-Brexit protester in Parliament Square Getty Brexit deal vote: Opposing groups of protesters gather by parliament Opposing protesters share the space outside parliament Getty Brexit deal vote: Opposing groups of protesters gather by parliament An anti-Brexit protester holds EU balloons outside parliament Reuters Brexit deal vote: Opposing groups of protesters gather by parliament Anti-Brexit protesters stand on Westminster Bridge PA Brexit deal vote: Opposing groups of protesters gather by parliament Former Ukip leader Nigel Farage speaks to the media at the protests outside parliament Reuters Brexit deal vote: Opposing groups of protesters gather by parliament Anti-Brexit protesters demonstrate outside the Houses of Parliament EPA Brexit deal vote: Opposing groups of protesters gather by parliament A pro-Brexit protester sets up outside parliament Reuters Brexit deal vote: Opposing groups of protesters gather by parliament An Avaaz campaigner holds a People’s Vote life float Reuters Brexit deal vote: Opposing groups of protesters gather by parliament A demonstrator holds a sign advocating a no-deal Brexit outside parliament AFP/Getty Brexit deal vote: Opposing groups of protesters gather by parliament An anti-Brexit protester waves an EU flag on Westminster Bridge PA Brexit deal vote: Opposing groups of protesters gather by parliament Protesters of opposing sides demonstrate outside parliament AFP/Getty Brexit deal vote: Opposing groups of protesters gather by parliament Protesters of opposing sides stand near parliament Reuters

Outside, rival pro and EU campaigners staged – mostly good-natured – demonstrations, while supporters of a Final Say referendum watched the landmark vote on giant screens in Parliament Square.

The Democratic Unionist Party, which is propping up the Tories in power – but voted against the deal – issued a brief statement confirming it would support Ms May in the confidence vote, making victory for her highly likely.

Speaking at the despatch box, the prime minister promised to hold the Brexit talks with MPs “in a constructive spirit”.

But she added: “Given the urgent need to make progress, we must focus on ideas that are genuinely negotiable and have sufficient support in this House.

“If these meetings yield such ideas, the government will then explore them with the European Union.”

The prime minister also “reassured” MPs that she did intend to “run down the clock to 29 March” and a no-deal Brexit, saying: “That is not our strategy.

“I have always believed that the best way forward is to leave in an orderly way with a good deal and have devoted much of the last two years negotiating such a deal.”

She promised to table “an amendable motion by Monday”, in line with the rebel amendment passed last week, to force the government to react quickly to the expected defeat.

And she added: “The second reassurance is to the British people, who voted to leave the European Union in the referendum two and a half years ago.