The British government led by Theresa May has survived a vote of no-confidence by a narrow margin of 19. The vote came at the end of a five hour debate on Wednesday evening on a motion tabled by Opposition leader Jeremy Corbyn, who accused the “zombie” government of failing the country and turning a deal that had been touted as “the easiest in history” into a “national embarrassment.”

May had been expected to win the vote as both her ally the Democratic Unionist Party of Northern Ireland and party MPs have promised to back her. 306 MPs voted with Corbyn and 325 voted against him. May responded to the result saying she wanted to reach out to opposition party leaders to meet her to discuss a route forward in a “constructive spirit.”

The vote follows the huge defeat suffered by the government on Tuesday night, when MPs resoundingly rejected the government’s Brexit withdrawal deal by a margin of 230 — the largest ever loss by a British government in modern history.

The margin was considerably larger than the 166 votes by which the minority government of Ramsay Macdonald lost a vote in 1924, which Corbyn said would have led any other leader to do the “right thing” and resign.

Corbyn too is under pressure from within his own party with 71 signing a letter calling on him to back a second referendum. For now, he remains committed to pushing for a general election, a Brexit that would involve a customs union with the EU and greater worker protections. He has criticised the government’s failure to include him in cross-party talks that she has suggested could be the way out of the political deadlock over the route forward.

If May claimed to have the support of the public, she should have “nothing to fear from going to the people” and letting them decide in a general election, he insisted. “If the government cannot get its legislation through Parliament it must go to the country for a new mandate and that must apply when it’s on the key issue of the day,” he told a raucous session of the House of Commons on Wednesday, ahead of the vote.

Had he won, Labour, the official opposition, would have had 14 days to put together a governing majority and should it fail to do so, another general election would be called. Under Britain’s fixed term Parliament legislation, a general election would only otherwise take place in 2022.

The Democratic Unionist Party of Northern Ireland, which had a supply and confidence agreement with the government but which voted against it on the withdrawal deal, had said that it will vote with the government on the no-confidence vote, as had members of the European Research Group, made up of hard Brexiteers who had opposed the withdrawal deal. Even Conservative advocates of a soft Brexit said they would vote with the government.

This meant that despite the backing of the Scottish National Party, the Liberal Democrats, the Welsh party Plaid Cymru and the Greens, Corbyn couldn’t command the votes he needed to defeat May and her government.