LONDON -- Prime Minister Theresa May has managed to hash out a draft agreement with the European Union on the terms of Britain's looming divorce from the EU, and to convince her own divided cabinet that the deal is a better than the default alternative -- a "no-deal Brexit." May emerged from her official residence at No. 10 Downing Street in London on Wednesday evening after a five-hour, "detailed and impassioned debate" to say her cabinet had taken a "decisive step" in the Brexit process.

Her government still needs the British Parliament, and all other EU member states, to sign off on the deal. May's government or the EU were expected to make the full details of the draft Brexit proposal public this week.

May's negotiating team handed its 500-page proposal over to cabinet members earlier on Wednesday, after they finally nailed down an agreement with EU counterparts on what has proved the most contentious issue; keeping the border between Northern Ireland (which is Britain) and Ireland (which is Europe) open and unrestricted.

Get Breaking News Delivered to Your Inbox

The proposal from May's team would, according to details leaked to British media, temporarily keep the entire U.K. within the European customs union, in exchange for the EU allowing the Irish border to remain free of physical barriers or checkpoints. That key tradeoff means Britain would still, for an unclear period, be subject to the EU's collective trade rules.

The trade union mandates tariff-free movement of goods across national boundaries within the bloc, and sets standardized rates for imports from outside the EU. It also sets dozens of other rules for trade within the EU.

May must convince her own

It has taken more than two years of agonizing negotiations in Brussels, set in motion by the 2016 public referendum result demanding the U.K. leave the European bloc, to get to this point. With her cabinet's backing secured, May must now win over even more skeptics in her own party.

Many in the divided Conservative Party believe her proposal leaves Europe with too much control over Britain's trade and borders, certainly if the U.K. remains for any considerable period part of the bloc's customs union. More philosophically, and perhaps more importantly from a public perpective, they argue that such a deal would betray the British public's will after the majority vote to leave the EU.

She insists her proposal delivers on key promises to reduce Europe's checks on British trade and immigration.

"We will deliver Brexit. We will not rerun the referendum," she vowed on the floor of the British Parliament on Wednesday.

She has framed the choice that faced her senior aides, and which now faces the British Parliament, in stark terms: accept her deal with the EU, which she says is the best one Britain could possibly attain, or reject it and leave Britain susceptible to as-yet-unclear consequences when the divorce happens anyway on March 29, as stipulated by EU rules.

Experts, politicians and pundits have warned for months that such a "no-deal" Brexit could cripple trade and the flow of essential goods into Britain, given that the kingdom would suddenly have no trade agreements in place with its most vital trading partner; the other 27 members of the European Union.

What May does not often discuss in public is the third option: a rejection of her Brexit proposal, and her leadership entirely.

Possibility of a party rebellion

If enough senior members of May's party balk at the deal, it could still lead to a challenge for the leadership of the party. In Britain's version of democracy, that means she could theoretically be unseated as Prime Minister and her entire government replaced through a snap election.

(Put simply, in the U.K. the public elects a party to lead the government, rather than a single person to lead the executive branch, as in the U.S. Party leaders are elected internally, and the leader of the party which wins a majority of seats in Parliament [when there is a clear majority] serves as prime minister.)

A senior party member warned hardline Conservative "Brexiteers" on Wednesday, that if they fail to back May's proposal, it could backfire on them.

Former Conservative Party leader William Hague, who voted to "Remain" in the 2016 referendum, said the public's decision must now be respected, and warned that rejecting May's proposal in hopes of a better deal would be inherently risky: "If you don't take this opportunity to leave the EU, to get Brexit over the line, you might never leave at all," he told BBC's Radio 4.

A second referendum?

That last remark from Hague was an acknowledgement of a growing movement in the U.K. -- in the public and among lawmakers from all major parties, including some Conservatives -- for a second public referendum on any Brexit deal eventually agreed on by Parliament.

Both left-leaning British lawmakers who never wanted to leave the EU, and some ardent backers of the vote to "Leave" have pushed for a second referendum, albeit with starkly different motivations.

While the Brexiteers are hoping another vote would bolster the mandate for a "hard" Brexit (a clean break, with the U.K. leaving all EU customs and trade agreements), many "Remainers" believe a second referendum could see the British public completely reverse its 2016 decision and reject any Brexit at all. The EU has left open the possibility of a British reversal.

Remainers point to polls which show a shift in opinion over the last two years, during which time the Brexit movement has been accused of lying about the potential benefits and pitfalls of a divorce from the EU -- and breaking Britain's election laws -- during the bitter campaign ahead of the first referendum.

Hague suggested on Wednesday that if May's cabinet had failed to back her proposal, "it would probably mean a different government."

With the cabinet's backing secured, any potential challenges appeared to be staved off on Wednesday, at least for the time being,

But senior members of May's cabinet have already left over her handling of the entire Brexit negotiations, including lead Brexit campaigner and former London Mayor Boris Johnson. If anyone from within the Conservative Party was to stage a challenge to May for leadership, his name is high in the betting odds.

The terms of the divorce still need to be agreed not only by Britain's Parliament (and possibly the public if a second referendum is called), but also by the governments of all 27 other EU member states.

If a deal is not finalized and put in place by March 29, the British withdrawal from the EU will be triggered automatically (no-deal Brexit) and all standing trade agreements between Britain and the EU will end. Britain's trade with all non-EU nations is also currently controlled to a large degree by EU regulations -- it also currently benefits from the collective bargaining power of membership in the 28-member bloc.

Broad World Trade Organization rules would apply under that scenario, but without specific deals in place, economists say the cost of trade for the U.K. would increase significantly, at least until new agreements are reached.