Media playback is unsupported on your device Media caption How MPs rejected a no-deal Brexit

Theresa May will make a third attempt to get her EU withdrawal deal through Parliament in the next week.

She told MPs that if her deal fails again to get their backing, a lengthy delay to Brexit may be needed.

The prime minister's warning comes ahead of a Commons vote later on whether to ask the EU for permission to delay Brexit beyond 29 March.

MPs voted on Wednesday evening to reject a no-deal Brexit under any circumstances.

No date has yet been set for the third so-called "meaningful vote".

What's happening today?

MPs will vote on a government motion which could see a delay to the UK's departure from the EU.

The UK government said there could be a short delay until 30 June, if MPs approve Mrs May's deal by 20 March - the day before the next EU summit in Brussels.

But BBC political editor Laura Kuenssberg said that even if the UK is given until the end of June to pass the legislation required to leave the EU, the government will try to do that earlier, if Mrs May's deal is passed next week.

Alternatively, there could be a much longer delay, requiring the UK to take part in elections for the European Parliament in May, the prime minister has said, in the event her deal is not approved.

However, any length of extension has to be agreed by the EU.

The DUP - which twice rejected Mrs May's deal in the Commons - is holding talks with the government to see if a solution could be found allowing its MPs to support the PM in a future vote.

What happened last night?

In a night of high drama on Wednesday, the Commons first voted on an amendment to reject the UK exiting the EU without a deal under any circumstances, by a margin of four.

That meant the government's original motion - which had stated that the UK should not leave the EU without a deal on 29 March - was changed at the last minute.

The government had wanted to keep control of the Brexit process, and keep no-deal on the table, so they then ordered Conservative MPs to vote against their own motion.

That tactic failed. Government ministers defied those orders and there were claims Mrs May had lost control of her party.

The updated motion, to reject a no-deal Brexit under any circumstances, was passed by 321 to 278, a majority of 43.

However, Wednesday's no-deal vote is not binding - under current law the UK could still leave without a deal on 29 March, unless an extension is agreed with the EU.

Please upgrade your browser to view this interactive How did my MP vote on 13 March? Enter a postcode, or the name or constituency of your MP Seat vacant

Speaking after the result of the vote was read out, Mrs May said: "The options before us are the same as they always have been.

"The legal default in EU and UK law is that the UK will leave without a deal unless something else is agreed. The onus is now on every one of us in this House to find out what that is."

Labour leader Jeremy Corbyn said that Parliament must now take control of the Brexit process and his party will work across the House of Commons to seek a compromise solution.

What is the EU saying?

On Thursday morning, European Council president Donald Tusk tweeted that he would "appeal to the EU27 to be open to a long extension if the UK finds it necessary to rethink its Brexit strategy and build consensus around it".

BBC Europe correspondent Kevin Connolly said that before approving any extension to Article 50 - the legal instrument by which the UK will leave the EU - EU leaders would want to know "how long an extension the UK requires and how it proposes to use the time".

A European Commission spokesperson said: "There are only two ways to leave the EU: with or without a deal. The EU is prepared for both.

"To take no deal off the table, it is not enough to vote against no deal - you have to agree to a deal.

"We have agreed a deal with the prime minister and the EU is ready to sign it."

How did ministers vote last night?

Thirteen government ministers - including Work and Pensions Secretary Amber Rudd, Business Secretary Greg Clark, Justice Secretary David Gauke and Scottish Secretary David Mundell - defied the government whips by abstaining in the vote.

Work and pensions minister Sarah Newton voted against the orders of the whips and has now resigned.

Mr Mundell said he backed the PM's deal and had always made clear his opposition to a no-deal Brexit.

In a crisis there can be opportunity.

This is now a crisis - the rules that traditionally have preserved governments are out of the window.

The prime minister has been defeated again. Her authority - if not all gone - is in shreds.

But for Number 10 there's an opportunity too, because MPs will soon be presented with a new choice - back the PM's deal, which has already been defeated twice, or accept the chance of a delay to Brexit.

This isn't the choice of a government that's in control. But the tactic is to make the best of chaos.

Read more from Laura here.

What else happened last night?

MPs also voted by 374 to 164 to reject a plan to delay the UK's departure from the EU until 22 May 2019, so that there can be what its supporters call a "managed no-deal" Brexit.

This amendment was known as the Malthouse Compromise - after Kit Malthouse, the government minister who devised it.