MPs have voted by 312 to 308 to reject leaving the EU without a withdrawal agreement.
It is not a legally-binding decision - and it does not rule out the UK leaving the EU.
But it means MPs could now get a vote on delaying Brexit.
That vote would take place on Thursday, and if it is passed - and the EU agrees to it - the UK will not leave the EU as planned on 29 March.
LIVE: MPs vote on no-deal Brexit
The government has tabled its own motion on rejecting a no-deal Brexit on 29 March - but MPs have now voted to reject no-deal under any circumstances.
MPs are now voting on whether to delay the UK's departure from the EU until 22 May, 2019 so that there can be a "managed no-deal" Brexit.
This amendment was proposed by Prime Minister Theresa May's former second-in-command, Conservative MP Damian Green. BBC