In a night of high drama in the House of Commons on Wednesday, 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, according to the BBC.
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.
That vote was on a motion which said the UK should not leave the EU without a deal specifically on 29 March, but with the option of a no-deal Brexit at any other time. It had originally been the government's motion.
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 it.
That tactic failed. Government ministers defied those orders and there were claims Theresa May had lost control of her party.
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.