U.K. Prime Minister Theresa May's government survived a no-confidence vote Wednesday, a day after British lawmakers overwhelmingly rejected her Brexit deal by a historic margin. The House of Commons expressed confidence in the government by 325 votes to 306, meaning May can remain in office.

Had the government lost, Britain would have faced an election within weeks while preparing to leave the European Union on March 29.

May faced the vote — and was battling to save her job — after her divorce deal with the European Union was rejected Tuesday by a vote of 432 to 202, a stinging gulf. It was widely expected the deal would be rejected, but the scale of the rout — the biggest defeat for a government in British parliamentary history — was devastating for May's leadership and her Brexit deal.

Get Breaking News Delivered to Your Inbox

Opposition Labour Party leader Jeremy Corbyn responded with a no-confidence motion, and urged the government to "do the right thing and resign."

"If a government cannot get its legislation through Parliament, it must go to the country for a new mandate," Corbyn said ahead of the vote, which took place Wednesday evening.

May had said she would stay put. Now, despite the reprieve from surviving the no-confidence vote, she faces a monumental struggle to find a way out of her country's Brexit impasse. She has until Monday to come up with a new blueprint for Britain's EU exit.