MPs have voted by 413 to 202 - a majority of 211 - for Prime Minister Theresa May to ask the EU for a delay to Brexit.It means the UK may not now leave on 29 March as previously planned.
Mrs May says Brexit could be delayed by three months, to 30 June, if MPs back her deal in a vote next week.
If they reject her deal again then she says she will seek a longer extension - but any delay has to be agreed by the 27 other EU member states.
Most Conservative MPs voted against delaying Brexit - including seven cabinet members - meaning Mrs May had to rely on Labour and other opposition votes to get it through.
But some Labour frontbenchers resigned to defy party orders to abstain on a vote on holding another referendum.
Downing Street said the government was still preparing for a no-deal Brexit.
Theresa May is planning to hold another "meaningful vote" on her withdrawal deal by Wednesday - after it was overwhelmingly rejected on two previous occasions.
It is still technically possible that we could leave the EU at the end of this month - the law has not changed.