Theresa May’s defeat on her Brexit deal – losing by 230 votes – has made history as the biggest ever government defeat on the floor of the House of Commons.

It easily beats the previous record of 166 votes, which was set in 1924 by the minority Labour government of Ramsay MacDonald, which was defeated over his decision to drop criminal proceedings against the editor of the Communist newspaper Workers Weekly.

Mr MacDonald declared the issue a matter of confidence – and, having lost the vote, obtained a dissolution of Parliament the following day. This led to a general election that his party lost.

The result of the vote on Ms May's deal, leaves the prime minister facing a vote of no confidence, also sets a new record for the largest rebellion in modern times by Conservative members of parliament.

The 118 Tory MPs who voted against the EU withdrawal agreement breaks the previous record of 95. This was the number who rebelled against John Major in 1997 and voted against gun controls introduced in response to the Dunblane shooting.

Ms May’s defeat came close to breaking another record: the largest rebellion in modern British politics by MPs of a single party.

The 118 Conservatives who voted against Ms May’s deal was 21 short of the largest ever revolt, which took place in March 2003 when 139 Labour MPs defied prime minister Tony Blair and voted against war in Iraq.

This remains the greatest revolt by MPs of any party since the repeal of the Corn Laws in the 1840s.

Following the minority government defeats of 1924, the next largest government defeat took place in March 1979, in the last few weeks of the Labour government led by Jim Callaghan. MPs voted by 115 to 26 on a motion to annul the fees for a firearms certificate – a defeat of 89 votes, although the number of MPs taking part in the vote was low.

Mr Callaghan’s government also suffered a defeat of 86 votes on January 1978, when MPs voted by 204 to 118 on an opposition amendment to the Scotland Devolution Bill, which excluded Orkney and Shetland from the provisions of the Bill if the islands voted “no” in a referendum.

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

Government defeats since 1979 have tended to occur by much smaller margins, though no prime minister – even with a landslide majority in the Commons – has escaped without at least one loss.

In April 1986 the Conservative government of Margaret Thatcher suffered a rare defeat over its plans to relax laws on Sunday trading in England and Wales. On the second reading of the Shops Bill, MPs voted against by 296 to 282 – a government defeat of 14.

More recently, the Labour government of Tony Blair was defeated in November 2005 on its proposal to allow police to detain terror suspects for up to 90 days without charge.

MPs voted against by 322 votes to 291 – a government defeat of 31. It was a small defeat but a symbolic one, as it was Mr Blair’s first House of Commons defeat since becoming prime minister eight years earlier in 1997.