Media playback is unsupported on your device Media caption Brexit: May under pressure over deal

Theresa May has secured a deal with the European Union on the terms of Britain's exit on 29 March - and a joint statement on how future relations between the two might work. What happens now?

The basics: A reminder

The UK is due to leave the European Union at 23:00 GMT on Friday 29 March, 2019, after people voted by 51.9% to 48.1% for Leave in the 2016 referendum.

The UK and the EU have spent more than a year trying to agree on how the divorce - as it's often called - will work in practice. This has now been agreed with the EU and backed by the cabinet, although two ministers resigned in protest at it. They have also agreed a rough outline of how future relations might work, known as the political declaration.

Theresa May now has to get MPs to vote for the withdrawal agreement and the political declaration. A vote scheduled for Tuesday, 11 December was delayed by the prime minister until 21 January at the latest.

If she eventually clears that hurdle, it will go to a vote in the European Parliament.

What has been agreed between the UK and EU?

There are two documents.

A draft 585-page agreement on Britain's withdrawal from the European Union is a legally-binding text that sets out the terms of the UK's departure. It includes:

Commitments over citizens' rights after Brexit - people will be able to work and study where they currently live, and to be joined by family members

A 21-month transition period after the UK's departure, to allow time for trade talks

The UK would continue to follow all EU rules during this period in order to give governments and businesses more time to prepare for long term changes

A "fair financial settlement" from the UK - also known as the £39bn "divorce bill"

A "backstop" arrangement to keep the Irish border unmanned if trade talks don't come up with a way of avoiding that happening

The other document is a 26-page statement on the UK's future relationship with the EU, when the transition period comes to an end. This is not legally-binding and contains wriggle room for both sides, based around the central ideal of continued close co-operation. The government has described it as "a set of instructions to negotiators" working on a legally-binding treaty.

Formal negotiations on everything it contains can only begin after Brexit has actually happened on 29 March 2019.

The declaration includes:

Plans for a "free trade area and deep co-operation on goods, with zero tariffs and quotas"

"Ambitious customs arrangements" that "build on" the arrangements in the withdrawal agreement

Commitment to respect the EU's four freedoms - the free movement of people, goods, services and money around the EU

A specific reference to the end of free movement in the UK

A reference to allowing the UK to strike its own trade deals after Brexit

An exit from the Common Agricultural Policy and the Common Fisheries Policy

Determination to use technology to replace the Northern Irish "backstop" - but no guarantee

A clear continuing role for the European Court of Justice in the interpretation of EU law

Continued participation in EU programmes in areas like science, culture, education, overseas development and space, including "a fair and appropriate financial contribution"

Continued co-operation on defence and security

Have they solved the Irish border issue?

This was the major sticking point in talks with Brussels. Both sides are committed to avoiding a return to a visible Northern Ireland border with guard posts and checks. They believe that bringing them back would put the peace process at risk.

So they agreed to put in place a "backstop" - a kind of safety net to ensure there is no hard border whatever the outcome of future trade talks between the UK and the EU.

The backstop will mean that Northern Ireland would stay aligned to some EU rules on things like food products and goods standards. That will prevent the needs for checks on goods at the Irish border, but would require some products being brought to Northern Ireland from the rest of the UK to be subject to new checks and controls.

The backstop would also involve a temporary single custom territory, effectively keeping the whole of the UK in the EU customs union.

But Brexiteers do not like the prospect of being tied to EU customs rules and they say there's no process for the UK to unilaterally decide to exit the backstop - and Northern Ireland's Democratic Unionist Party has said it will not tolerate anything that creates a new border down the Irish Sea.

Could the transition period be extended?

Mrs May insists she does not want to use the backstop and says it is highly unlikely that it will ever be triggered (her critics think otherwise).

But if no trade deal is in prospect by July 2020, the two sides could agree to extend the transition period instead. This would avoid the need for the backstop at that time, and keep trade with the EU flowing as it does now.

They could do this only once. The transition could not go on being extended indefinitely.

But there is no agreement on how long any extension would be. Some have suggested the end of 2022, but the government position has been for it all to be sorted before the next election, which is due in Spring 2022.

Either way, this could keep the UK under EU rules for at least three years after March's official Brexit date, something Brexiteers are also unhappy about.

Media playback is unsupported on your device Media caption When will Brexit happen?

Can Theresa May get the deal through the Commons?

As things stand, it looks unlikely. MPs were scheduled to vote on Tuesday, 11 December. However, the prime minister delayed the vote, admitting that "widespread and deep concern" over the Northern Ireland backstop meant the deal would have been rejected "by a significant margin".

Mrs May said she would raise those concerns with EU leaders, and also look at ways to give MPs the power to force the government to "ensure that the backstop cannot be in place indefinitely" and has "democratic legitimacy".

Downing Street has said it will be rescheduled for 21 January at the latest, although Brexit Minister Robin Walker told MPs he hoped it would be sooner.

Before the vote was postponed, Labour and all the other opposition parties in the House of Commons had said they would vote against the deal. About 100 Conservative MPs have said will not support it, although some might abstain rather than actually voting against. And Northern Ireland's Democratic Unionist Party, who Mrs May relies on to keep her in power, have also said they will vote against it.

Theresa May is hoping to persuade MPs that the deal not only delivers on the result of the EU referendum by allowing the UK to take back control of its "money, laws and borders" it is also the best the UK can get from the EU and there is no alternative on offer.

She will also argue that if her deal is voted down, Britain risks leaving without a deal - a prospect feared by many MPs, who think it will cause chaos at the ports and damage industry - or, she says, there will be "no Brexit at all".

Why are MPs against the deal?

Brexiteers say it is not what people voted for - and it could keep the UK tied to the EU indefinitely, without any say over its rules. Some have even argued that it would be worse than staying in the EU.

Remainers also argue that it is a worse deal for the UK than staying in the EU.

What happens if Mrs May can't get the deal through the Commons?

Media playback is unsupported on your device Media caption Radio 4 The World at One asks: What will happen if Parliament rejects the Brexit plan?

It is hard to say for certain. There are number of possible scenarios, including:

Leaving the EU without a deal

Having another vote in Parliament - Mrs May will get three weeks to make a second attempt

Another EU referendum (this can only happen if the government brings forward legislation to hold one and a majority in the Commons supports it)

A general election - Labour's preferred option but it would need a no-confidence vote in the PM

Theresa May is removed by her own MPs and a new leader tries to renegotiate a deal with the EU - Tory MPs say they are close to having enough signatures to trigger a confidence vote in her

Some of these options would involve delaying the official Brexit date of 29 March by a few months to allow time to renegotiate a deal, if the EU agrees to that

Labour's shadow chancellor John McDonnell has also floated the idea of Labour forming a minority government without a general election to have a go at getting its own version of Brexit - centred around a permanent customs union with the EU - through Parliament, although the party would then have to get the EU to agree to that.