Brexit: What just happened?
The EU has agreed to postpone Brexit from next Friday and give UK Prime Minister Theresa May more time to get her deal approved in Parliament.
But - and with Brexit there is always a but - it is not as simple as it may sound. Here is what just happened, why it matters, and what might happen next.
What happened in Brussels?
Mrs May was forced to ask EU leaders to delay Brexit after the UK Parliament twice overwhelmingly rejected the deal she had agreed with the EU on how to withdraw from the bloc and voted against a no-deal exit.
EU leaders are among those who fear the UK leaving the bloc without a deal would lead to chaos.
Mrs May had hoped to persuade the EU to delay the 29 March Brexit date - which is set in law - to 30 June. Instead the 27 EU leaders offered her two dates:
- A delay until 22 May if MPs approve her withdrawal deal in a vote next week
- A shorter delay until 12 April if they reject it. By that time the UK must set out its next steps - either another extension or leaving without a deal
But the EU says a further extension beyond 12 April is only possible if the UK agrees to hold European elections on 23 May.
Mrs May has said the UK will not take part in the vote.
The EU's offer means a no-deal Brexit is considerably less likely on 29 March. But it is not off the table yet and the way forward is far from clear.
What will happen next?
It had been thought MPs would vote for a third time on the Brexit deal next week.
Now Mrs May has suggested to MPs this might not happen "if there is not sufficient support".
A third attempt at getting her deal passed had already been thrown into doubt by House of Commons Speaker John Bercow.
Earlier this week, he cited parliamentary precedent to rule that a third vote could only take place if the proposal on the table was substantially different from the previous one.
Another task facing MPs is to change the legally-binding 29 March date to leave the EU.
If MPs approve her deal...
The UK leaves under Theresa May's EU Withdrawal Agreement on 22 May, to enable Parliament to pass all the legislation needed.
But getting it approved will be a tough task for Mrs May, especially after she angered MPs on Wednesday by going on television to essentially blame them for the impasse.
She did offer a more conciliatory tone on Thursday but it remains to be seen if she will be able to convince MPs to back her agreement.
If MPs reject her deal...
The UK could still leave with no deal on 12 April if a way forward is not found. But other options include:
- Parliament could try to take control of the process and offer a new strategy. MPs have been told that if the deal is rejected they can hold a series of "indicative" votes to see if there is a majority for any particular alternative, such as staying in the EU Customs Union
- Mrs May would then know which option had most support in Parliament. She would then have to agree to pursue a new policy for the EU to reopen talks
- The opposition Labour party could table a vote of no confidence aimed at bringing down Mrs May's government - but it would require the support of some of Mrs May's own Conservatives. It is not clear what would happen to the dates set by the EU
- Mrs May could ask Parliament to hold an early general election or, most unlikely, call another referendum. Again, it is not entirely clear what would happen in that scenario
- Article 50, the two-year treaty provision that the UK invoked to leave the bloc in 2017, could be revoked by Mrs May, delaying Brexit indefinitely. But she is strongly opposed to that. A petition calling for the article to be revoked has reached more than three million signatures
What does this mean for Mrs May?
The BBC's political editor Laura Kuenssberg says the choices for Mrs May are running out, making her leadership difficult to maintain.
Many MPs within her own party are alarmed by the events of the past few days.
And, she says, it is likely that MPs from all parties will push for a series of votes on different versions of Brexit or another referendum, in an attempt to take control of the process.
Mrs May arrives back in the UK today, writes Laura Kuenssberg, having won a little bit of extra time, but less and less space to breathe.
How does the EU see it?
EU leaders were reportedly unconvinced by Theresa May's assurance that she could convince the UK Parliament to back her withdrawal deal.
Mrs May made her case for a delay in a 90-minute presentation to her European counterparts and then left the room and the discussions continued for eight hours.
French President Emmanuel Macron said he thought she had a chance of 10% of having her deal approved but after listening to her he had cut his estimate to 5%, Reuters news agency said.
European Council President Donald Tusk replied that Mr Macron was being "very optimistic", it reported.
But the end could be in sight?
Not yet. It is worth remembering that the debate now is focused on the terms of the UK's exit from the European Union.
The conditions of the future relationship between the country and the bloc still have to be negotiated.