May won a narrow victory, 325 votes to 306 votes, on an opposition motion seeking to topple her government and trigger a general election.
Now it's back to Brexit, where May is caught between the rock of her own negotiating red lines and the hard place of a Parliament that wants to force a radical change of course.
After defeating the no-confidence motion, May said she would hold talks "in a constructive spirit" with leaders of opposition parties and other lawmakers in a bid to find a way forward for Britain's EU exit.
She appeared outside her 10 Downing St. residence after meeting the leaders of several smaller parties. The prime minister named the parties in a statement in which she called on opposition politicians in Parliament to "put self-interest aside" and find a consensus on Britain's path out of the EU.
Legislators ripped up May's Brexit blueprint Tuesday by rejecting the divorce agreement she has negotiated with the EU over the last two years. That it would lose was widely expected, but the scale of the rout - 432 votes to 202, the biggest defeat government defeat in British parliamentary history - was devastating for May's leadership and her Brexit deal.
Opposition Labour Party leader Jeremy Corbyn responded with the no-confidence motion, and urged the government to "do the right thing and resign."
May, who leads a fractious government, a divided Parliament and a gridlocked Brexit process, said she was staying put. May said an election "would deepen division when we need unity, it would bring chaos when we need certainty, and it would bring delay when we need to move forward."
The government survived Wednesday's vote with support from May's Conservative Party and its Northern Irish ally, the Democratic Unionist Party. Many pro-Brexit Conservatives who voted against May's deal, backed her in the no-confidence vote to avoid an election that could bring a left-wing Labour government to power.
Had the government lost, Britain would have faced a snap election within weeks, just before the country is due to leave the European Union on March 29.
Political analyst Anand Menon, from the research group U.K. in a Changing Europe, said May had a remarkable ability to soldier on.
"The thing about Theresa May is that nothing seems to faze her," he said. "She just keeps on going."
May's determination - or, as her foes see it, her inflexibility - might not be an asset in a situation calling for a change of course. The prime minister has until Monday to come up with a new Brexit plan.
Despite May's pledge to seek a broad consensus, there was no sign of an immediate breakthrough. Opposition leaders brought her a laundry list of sometimes conflicting demands.
Labour's Corbyn said he would not meet with May until she ruled out a no-deal Brexit. Scottish National Party leader Nicola Sturgeon said she needed to keep the option of a second Brexit referendum on the table.
More meetings were planned for Thursday. May said she was disappointed Corbyn had not met her yet but added "our door remains open."
May insisted that any new Brexit plan must "deliver on the referendum result," which she has long interpreted to mean ending the free movement of workers to Britain from the EU and leaving the EU's single market and customs union.
Many lawmakers think a softer departure that retained single market or customs union membership is the only plan capable of winning a majority in Parliament. They fear the alternative is an abrupt "no-deal" withdrawal from the bloc, which businesses and economists fear would cause turmoil.
Labour lawmaker Ben Bradshaw accused May of being "in a total state of denial" about how radically her Brexit plan needed to change.
Faced with the deadlock, lawmakers from all parties are trying to wrest control of the Brexit process so that Parliament can direct planning for Britain's departure.
But with no clear majority in Parliament for any single alternative, there's a growing chance that Britain may seek to postpone its departure date while politicians work on a new plan - or even hand the decision back to voters in a new referendum on Britain's EU membership.
European leaders are now preparing for the worst, although German Chancellor Angela Merkel said there was still time for further talks. She told reporters in Berlin that "we are now waiting to see what the British prime minister proposes."
But her measured remarks contrasted with the blunt message from French President Emmanuel Macron, who told Britons to "figure it out yourselves." He said Britain needed to get realistic about what was possible.
"Good luck to the representatives of the nation who have to implement something that doesn't exist," Macron said.
EU Brexit negotiator Michel Barnier said the bloc was stepping up preparations for a disorderly "no-deal" Brexit after Parliament's actions left Europe "fearing more than ever that there is a risk" of a cliff-edge departure.
Economists warn that an abrupt break with the EU could batter the British economy and bring chaos at borders, ports and airports. Business groups have expressed alarm at the prospect of a no-deal exit.
France's parliament on Wednesday adopted a law allowing for emergency measures, including extra customs officers, to deal with a "no-deal" Brexit.
Investors appeared to shrug off both the rejection of May's deal and welcomed the survival of her government. The pound was up against the dollar early Wednesday and rose further after the no-confidence vote to $1.2880.
May's deal was doomed by deep opposition from both sides of the divide over the U.K.'s place in Europe. Pro-Brexit lawmakers say the deal will leave Britain bound indefinitely to EU rules, while pro-EU politicians favor an even closer economic relationship with the bloc.
The most contentious section was an insurance policy known as the "backstop" designed to prevent the reintroduction of border controls between the U.K.'s Northern Ireland and the Republic of Ireland, an EU member state. Assurances from EU leaders that the backstop is intended as a temporary measure of last resort failed to win over many British lawmakers.
Irish Prime Minister Leo Varadkar said it was now up to opponents of the backstop "to come up with an alternative solution to honor their commitment to avoiding a hard border."
Varadkar said if May's government was willing to shift some of its "red lines" in negotiations - such as leaving the customs union and EU single market - then the position of EU negotiators would also change.
"The onus is on Westminster" to come up with solutions, Varadkar said
Raf Casert in Strasbourg, France, Frank Jordans in Berlin, Sylvie Corbet in Paris and Pan Pylas in London, contributed.
Follow AP's full coverage of Brexit at: https://www.apnews.com/Brexit
Copyright 2019 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.