Image copyright PA Image caption Three more months of Brexit debate, then?

British MPs have voted for a delay in the Brexit process for three months or more, after struggling to agree on what terms the UK should leave the European Union on 29 March.

You might think, after months of division, infighting and uncertainty that surely, surely, this means everything will go smoothly from here.

Well... no.

Here's what just happened, why it matters, and what might happen next.

Members of Parliament have struggled to agree how Britain should leave the EU on 29 March. Deals proposed by Prime Minister Theresa May (and agreed with the EU) have twice failed to get through the House of Commons.

Now, MPs hope their 413 to 202 vote on Thursday will help them agree a deal. Any problem? Yes - the Brexit deadline is legally binding, and can't be extended without the agreement of all 27 other EU countries.

Even if the deadline is extended to help prompt the divided British Parliament (and divided governing Conservative Party) to agree a Brexit deal, there's no guarantee they will.

What's the context?

This is all coming to a head now because the British government triggered the start of the two-year departure process on 29 March 2017.

With days to go until that finishing post, it's no clearer on what terms the UK should pull out (on trade, the transition period and the status of the Irish border, for example).

The prime minister's two (rather similar) proposals have failed to get the backing of a majority in Parliament, partly because the more hardline but influential Brexiteers within her own party have snubbed her proposals.

Which leaves us where we are now.

There are serious concerns that leaving the EU without a deal in place could damage the economy and lead to shortages or price increases in food and medicine, among other consequences. MPs voted on Wednesday to rule out leaving with no deal, but that vote isn't binding.

Now MPs hope that the delay of three months or more they agreed on Thursday can help them finally find a consensus.

If only it were that straightforward.

What might happen next?

The British government can't just click its fingers and extend the deadline. It will need to make a convincing case to the 27 other EU countries as to why the deadline should be extended. The EU would then need to agree that this is the best way forward.

The question of how long it should be extended also now comes into play.

On Thursday, the British Parliament agreed that Brexit could be delayed by three months, until 30 June.

However, that is on the condition that MPs agree a deal by next Wednesday so there is enough breathing space before it's implemented.

But the only deal on the table right now is the same one MPs rejected on Tuesday. What's to say it won't be rejected again?

On the other hand, the EU has indicated that it wants a longer deadline.

Please upgrade your browser Your guide to Brexit jargon Use the list below or select a button

Donald Tusk, the European Council president who represents all EU members' interests, said on Thursday he would urge those countries "to be open to a long extension if the UK finds it necessary to rethink its Brexit strategy and build consensus around it". That agreement would have to come at a summit in Brussels next week.

For this to happen, the EU has said it would want the UK to demonstrate a clear strategy.

But a longer deadline still wouldn't offer a guarantee that the British Parliament would agree a deal in that time - it might just prolong the arguments.

And a longer delay (that would still need to be agreed by both parties) would probably, awkwardly, require the UK to take part in European elections in late May.

So could there be a second referendum? That too was ruled out by MPs on Thursday.

What's stopping a deal?

One of the biggest bones of contention is what should happen to the so-called backstop.

Media playback is unsupported on your device Media caption Confused by Brexit jargon? Reality Check unpacks the basics.

Both sides have committed to avoiding the return of a hard border - physical checks or infrastructure - between Northern Ireland and the Republic of Ireland when the UK leaves the EU.

The backstop is a safety net, an arrangement that will apply to the Irish border after Brexit if a wider deal or technological solution can't be found that keeps the border as frictionless as it is today.

But Conservative Brexiteers are concerned that the backstop could keep the UK indefinitely locked into an arrangement with the EU, if no alternative is found.