LONDON (Reuters) - British Prime Minister Theresa May has agreed a draft exit agreement with the European Union, but has to persuade her divided cabinet and then a skeptical parliament to approve it.

Britain's Prime Minister, Theresa May, leaves 10 Downing Street, in London, Britain November 14, 2018.REUTERS/Henry Nicholls

WHAT DOES MAY HAVE TO DO?

If the deal is agreed by May’s cabinet and EU leaders, she has to publish in parliament the withdrawal deal and an outline agreement of Britain’s future relationship with the bloc.

A debate will follow, expected to last several days, ending with a vote in the lower house on approving the deal.

HOW WILL THE VOTE WORK?

The format of the debate and vote has yet to be decided and is subject to fierce disagreement, as it could help to determine the outcome.

Ministers argue any parliamentary approval of the deal must be unambiguous. If not, they say the vote might not meet the legal criteria for ratification of the withdrawal agreement.

May’s opponents on Brexit want to use the debate to show there is majority support for a different strategy, such as a second referendum or remaining inside the EU’s customs union.

There could be multiple votes which, although not legally binding, would be hard to ignore if they reveal backing for an alternative exit arrangement.

The format will be decided closer to the time, based on lawmakers’ recommendations. Legislation stipulates only that ministers should try to hold a debate before the European Parliament has its own vote.

WHAT ABOUT THE HOUSE OF LORDS?

The unelected House of Lords will also debate the deal but will be asked only to “take note” of it. The upper house will not have the power to block the deal.

WHAT WILL LAWMAKERS VOTE ON?

Lawmakers will vote on a package consisting of:

1) The withdrawal agreement - a legal document setting out issues such as citizens’ rights, the financial settlement, a backstop for the Irish border issue and the terms of an implementation period designed to smooth the exit process.

2) The future relationship framework - a non-legal document defining how Britain and the EU will work together in the long term on issues such as trade and security.

These documents define the deal Britain has been negotiating with the European Commission since June 2017.

WHO VOTES?

Around 320 votes are needed to be certain of winning a vote in the 650-seat House of Commons, depending on abstentions and absences. Some elected members never take up their seats.

The vote is decided by a simple majority.

HOW WILL THE RESULT BE ANNOUNCED?

At the end of a debate, the speaker typically asks for those in favor of the motion to shout “aye” and then those against to say “no”. If some lawmakers shout “no”, the speaker calls a formal vote.

Votes are registered by lawmakers walking through different doorways, out of sight of television cameras and onlookers. Once the headcount is complete lawmakers return to the chamber. A teller then announces the result.

HOW WILL THE PARTIES VOTE?

The ruling Conservative Party has 315 lawmakers. It governs with a working majority of 13 thanks to a deal with the 10 lawmakers of the Northern Irish Democratic Unionist Party (DUP).

May’s party is not united behind her plan. Eurosceptics think it leaves Britain too tied to EU rules and pro-EU lawmakers say the ties are not close enough. Both groups are large enough to inflict defeat.

DUP support depends on the solution agreed for the border between the British province of Northern Ireland and the Irish republic. The party has said it will not support any deal that leaves Northern Ireland subject to different rules from the rest of the United Kingdom.

The opposition Labour Party, which has 257 lawmakers, has pledged to vote down any deal that does not meet its criteria. The current plans are unlikely to do this, so most Labour lawmakers can be expected to vote against.

However, some Labour rebels could vote with the government to avoid the risk of a “no-deal” Brexit.

The Scottish National Party’s 35 lawmakers are expected to vote against the deal, as are the 12 Liberal Democrats.

IF MAY WINS, IS THAT IT?

No. The government must pass separate legislation to implement the withdrawal agreement and complete the ratification process.

This will be known as the EU (Withdrawal Agreement) Bill. It will be subject to parliamentary scrutiny, involving possible amendments. It must be passed before March 29, 2019.

This process is unlikely to unpick the Brexit deal as the legislation will implement what parliament has approved. However, lawmakers could use the bill to stall the exit process.

WHAT IF MAY LOSES?

This could topple May and her government.

By law, if the government motion is rejected, ministers have 21 days to state how they intend to proceed. The government has said that if the agreement is rejected, Britain will leave the EU without a deal.

It then has to call a parliamentary debate that could give lawmakers another chance to set out amendments - effectively allowing a vote on an alternative path. Amendments would not be binding, but if approved May would find them hard to ignore.

It is also technically possible for the government to call a second vote and ask lawmakers for their approval again on either the same, or amended terms.