MPs will vote on Thursday on delaying Brexit after they rejected the idea of leaving the EU without a deal.
In a night of high drama in the Commons, MPs surprised the government and voted by 312 to 308 to reject a no-deal Brexit under any circumstances.
The vote is not binding – under current law the UK could still leave without a deal on 29 March.
On Thursday, MPs will vote on whether to ask the EU for permission to delay the date for departure.
There could be a short extension – or a much longer one – depending on whether MPs backed the prime minister’s existing withdrawal deal that has been agreed with the EU by 20 March, the government says.
That means Theresa May could make a third attempt to get her deal through Parliament in the next few days.
In a series of votes on no-deal Brexit, the Commons first voted by a margin of four to reject no deal outright.
Then, in a second vote, they reinforced that decision by 321 to 278, a majority of 43.
That second vote was on a government motion, which said the UK should not leave the EU without a deal on 29 March, but with the option of a no-deal Brexit at any other time.
The government wanted to keep control of the Brexit process, and keep no-deal on the table, so they ordered Conservative MPs to vote against their own motion.
That tactic failed. Government ministers defied those orders and there were claims Theresa May had lost control of her party.
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.
A night of pandemonium
By BBC political correspondent Chris Mason
“Are you well?” I asked of a senior member of the government, caught up in the thick of it tonight.
“I wouldn’t go that far!” came the response.
What a night – pandemonium in the cabinet, confusion in the Commons chamber.
Looking down from the press gallery, some ministers could be seen wrestling with their conscience: hating the idea of a no-deal Brexit, hating the idea of defying the government – and not quite clear if they’d lose their jobs if they did.
Thirteen ministers, including four in the cabinet, could not bring themselves to back the government.
Afterwards, some ministers were seen literally running away, such is the anger tonight has provoked.
So, “what’s going to happen next?” seemed like a reasonable question to a minister.
“I’ve no idea. Find me someone who has and I’ll find you a liar,” came the reply.
In fair fruitier terms than these pages allow, another MP described it as a “cluster” something – and then predicted the prime minister might, just might, ram her deal through in the end.
“It’s a scorched earth policy,” the MP said.
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.”
On Thursday, MPs will be asked if they want to delay Brexit until 30 June – to allow the necessary legislation to get through Parliament.
But that is only if MPs back Mrs May’s deal by 20 March, the government says.
If they fail to back her deal by then, then the delay could be longer, Mrs May warned MPs, and it could clash with the European Parliament elections in May.
“I do not think that would be the right outcome. But the House needs to face up to the consequences of the decisions it has taken,” she said.
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.
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.
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.”