LONDON — Prime Minister Theresa May of Britain faced down hard-line critics Wednesday and won the support of a jittery and divided cabinet for a plan to quit the European Union, preserving her push to avert an economically damaging rupture with the bloc in March.

For Mrs. May, frequently criticized as wooden and lacking in strategic thinking, the victory represented a rare validation of her leadership. It also provided a glimmer of light at the end of the Brexit tunnel.

“The choices before us were difficult,” Mrs. May said in a brief statement in front of her offices at 10 Downing Street. “But the collective decision of the cabinet was that the government should agree to the draft withdrawal agreement and the outline political declaration.”

Despite fears that cabinet ministers might resign in protest, possibly threatening her government, none did so immediately. Nevertheless, Mrs. May acknowledged publicly that around five hours of talks had produced “impassioned” debate. That description seemed to corroborate media reports that as many as 10 cabinet ministers had expressed reservations before the plan was agreed upon without a vote.

There also was growing speculation that hard-line pro-Brexit Conservative lawmakers, angry at what they viewed as a flawed deal, could force a vote of no confidence in Mrs. May. Such a process would require 48 Conservatives to submit letters of request.

The cabinet vote was a culmination of months of often tedious and difficult negotiations with the European Union, which always held the upper hand and was determined that Britain should not gain any advantage in leaving the bloc. Mrs. May was also handcuffed by her devastating failure to win a parliamentary majority in an election she called needlessly last year.

Defying many predictions of her demise, she nevertheless pressed ahead, determined as she said many times to deliver the Brexit the British people voted for. Whether she accomplished that will be the subject of much debate in the coming weeks.

The 585-page draft agreement creates a standstill transition period. During that time very little would change until the end of 2020, but negotiators would aim to draw up a trade deal.

The withdrawal pact covers three main areas: the financial settlement for the divorce; the rights of British citizens on the Continent and of European Union citizens in Britain; and a mechanism to assure there is no hard border between Ireland, in the bloc, and Northern Ireland, in the United Kingdom.

Of the three, the Irish border will present the greatest trouble for Mrs. May, as it has from the outset of the Brexit process.

If things go to plan, the agreement will be approved this month at a summit meeting of the bloc’s leaders. Soon after, it will go before the European Parliament, which is expected to follow suit.

But, as always with Brexit, it seems, the topping of one hurdle only points the way to the next, in this case an all-out political war in Parliament, which must still approve a draft agreement that has already provoked widespread criticism even before publication. Mrs. May lacks a majority there, and has enemies of several ideological persuasions lying in wait to stymie her.

Since Britons decided in a 2016 referendum to quit the bloc, Mrs. May’s Conservative Party has been bitterly divided between those who want to preserve close economic ties with the Continent, to protect the economy, and others who want a cleaner break. Many of those issues are unlikely to be addressed until the future trade deal is negotiated.

Most of the current debate promises to focus on proposals for a “backstop” plan to prevent physical checks at the border between Ireland and Northern Ireland.

Until other trade plans are in place, complete with technology to negate the need for border checks in Ireland, the whole of the United Kingdom would remain in a customs union with the European Union. That is a concession from the European side, which had been insisting on a backstop to the backstop, something relating to Northern Ireland only, and a proposal Mrs. May and her partners did not believe they could sell to her party or Parliament.

What the negotiators came up with was a mechanism they called the “swimming pool,” a strange one with only a deep end and a shallow end. In the deep end is Northern Ireland, which would remain part of a European customs union and subject to many of the European Union’s regulatory rules for goods for an extended period. In the shallow part is the rest of the United Kingdom, which will remain in the bloc’s customs union on trade in goods, also for an undetermined time.

An arbitration mechanism would ultimately decide when the border problem had been resolved.

British critics of the deal argue that it represents the worst of all worlds, leaving Britain tied, perhaps in perpetuity, to many European Union rules over which it would have no influence — the direct opposite of the Brexit slogan of the 2016 referendum, which promised to “take back control.”

But Mrs. May will argue that this is the only chance of leaving the bloc without risking economic dislocation from a chaotic exit not accompanied by an agreement with Britain’s biggest trade partner.

Some analysts believe that the deal she has struck was about as good as she could get, given the parameters Mrs. May had set.

“Once we were in a position where we wanted to avoid economic damage, avoid checks at the border in Ireland and had decided on a very close economic relationship, like Norway, this was the ballpark,” said Anand Menon, professor of European politics and foreign affairs at King’s College London. “This was always where we were going to land.”

Mrs. May and her allies are busily rounding up business endorsements of her proposals, and betting that the fear of a disorderly no-deal Brexit will persuade many reluctant lawmakers to swallow hard and support her plan as the lesser of two evils.

Image

Brexit supporters in London on Wednesday.CreditJack Taylor/Getty Images

The government whips, who control parliamentary discipline, are likely to use whatever inducements they can to bring wobbling Conservative critics into line. They also hope some opposition Labour lawmakers will defy their leadership, which is almost certain to oppose Mrs. May’s plans in hopes of profiting from the resulting chaos.

All that could allow Mrs. May to “build up momentum,” for her plan, said Mr. Menon, adding that the outcome was “too close to call.”

Ominously for Mrs. May, her declared critics come from an array of different perspectives, however. And numerous efforts to predict the outcome have so far failed to come up with a convincing path to victory for Mrs. May.

For instance, she relies in Parliament on the support of 10 lawmakers from Northern Ireland’s Democratic Unionist Party. But they are angry at the possibility of regulatory barriers being created between Northern Ireland and the rest of the United Kingdom — the deep versus shallow end of the pool.

“We will not be voting for this humiliation,” wrote one lawmaker, Sammy Wilson, on Twitter.

In addition to the opposition Labour Party, the Scottish National Party’s lawmakers and centrist Liberal Democrats are expected to vote against the plan.

According to Steve Baker, a prominent pro-Brexit Conservative, more than 50 of his like-minded colleagues could oppose the plan, believing it to be worse than European Union membership.

On Wednesday in Parliament, one Conservative pro-Brexit lawmaker, Peter Bone, accused Mrs. May of “not delivering the Brexit people voted for,” predicting she would lose the support of many of her party colleagues and “millions of voters.”

Other Brexiteers who condemned the deal included the former Brexit secretary, David Davis, who quit his cabinet position in the summer, and who described the plan as a capitulation.

A small group of pro-European Conservative lawmakers are likely to try to block the deal, too, hoping that in doing so they might secure a referendum on the terms of the deal, and a route to reversing Brexit.

They have been emboldened by the resignation last week of the rail minister, Jo Johnson, who accused Mrs. May of presenting Parliament with a choice between “vassalage and chaos,” and called for another vote. He campaigned in the 2016 referendum to remain in the European Union but is the brother of the pro-Brexit, former foreign secretary, Boris Johnson.

And there was more trouble for Mrs. May from her 13 lawmakers from Scotland, who worry that Britain will remain tied to European fisheries policy, dashing hopes of a better deal for their fishing communities. As staunch defenders of the unity of the United Kingdom, they are also concerned in principle about different economic treatment for Northern Ireland.

A version of this article appears in print on , Section A, Page 10 of the New York edition with the headline: In Rare Victory for May, Cabinet Backs Her Brexit Plan. Order Reprints | Today’s Paper | Subscribe