Theresa May's EU withdrawal deal has been rejected by MPs by an overwhelming majority for a second time, with just 17 days to go to Brexit.
MPs voted down the prime minister's deal by 149 – a smaller margin than when they rejected it in January.
Mrs May said MPs will now get a vote on whether the UK should leave the EU without a deal and, if that fails, on whether Brexit should be delayed.
She said Tory MPs will get a free vote on a no-deal Brexit.
That means they can vote with their conscience rather than following the orders of party managers – an unusual move for a vote on a major policy, with Labour saying it showed she had "given up any pretence of leading the country".
The PM had made a last minute plea to MPs to back her deal after she had secured legal assurances on the Irish backstop from the EU.
But although she managed to convince about 40 Tory MPs to change their mind, it was not nearly enough to overturn the historic 230 vote defeat she suffered in January, throwing her Brexit strategy into fresh disarray.
In a statement after the defeat, Mrs May said: "I continue to believe that by far the best outcome is the UK leaves the European Union in an orderly fashion with a deal.
"And that the deal we have negotiated is the best and indeed only deal available."
Setting out the next steps, she said MPs will vote on Wednesday on whether the UK should leave the EU without a deal or not.
If they vote against a no-deal Brexit, they will vote the following day on whether Article 50 – the legal mechanism taking the UK out of the EU on 29 March – should be extended.
Mrs May said MPs would have to decide whether they want to delay Brexit, hold another referendum, or whether they "want to leave with a deal but not this deal".
She said that the choices facing the UK were "unenviable", but because of the rejection of her deal, "they are choices that must be faced".
Mrs May also told MPs the government would announce details of how the UK will manage its border with Ireland in the event of a no-deal Brexit on Wednesday.