The government has been narrowly defeated in a key vote on its Brexit bill after a rebellion by 12 Tory MPs.
In a blow to Prime Minister Theresa May, MPs voted to give Parliament a legal guarantee of a vote on the final Brexit deal struck with Brussels.
The government had argued this would jeopardise its chances of delivering a smooth departure from the EU.
Despite a last-minute attempt to offer concessions to rebels, an amendment to the bill was backed by 309 to 305.
- Parliament Live: MPs debate EU withdrawal bill
- What the EU Withdrawal Bill will do
Of the 12 Conservative MPs who voted against the government, eight are former ministers.
One of them, Stephen Hammond, was sacked as Conservative vice chairman in the aftermath of the vote.
“Tonight I put country and constituency before party and voted with my principles to give Parliament a meaningful vote,” he tweeted.
The government said it was “disappointed” at losing – its first defeat on Brexit – despite the “strong assurances” it had offered.
What does it mean?
BBC political editor Laura Kuenssberg
It’s the first time that Theresa May has been defeated on her own business in the Commons. She has to front up in Brussels tomorrow with other EU leaders only hours after an embarrassing loss in Parliament.
Beyond the red faces in government tonight, does it really matter? Ministers tonight are divided on that. Two cabinet ministers have told me while it’s disappointing it doesn’t really matter in the big picture.
It’s certainly true that the Tory party is so divided over how we leave the EU that the Parliamentary process was always going to be very, very choppy.
But another minister told me the defeat is “bad for Brexit” and was openly frustrated and worried about their colleagues’ behaviour.
Read the rest of Laura’s blog
The defeat, on the eve of an EU summit where Mrs May and other leaders will discuss Brexit, came after opposition parties joined forces with Conservative rebels during a heated debate in the Chamber on the amendment.
Critics accused those behind the amendment – which was authored by former attorney general Dominic Grieve and championed by other pro-Remain campaigners – of trying to “frustrate” Brexit and tying the government’s hands.
But it was backed by the Commons, meaning a new Act of Parliament will have to be passed before ministers can implement the withdrawal deal struck with Brussels.
After the result was announced, one of the rebels, former cabinet minister Nicky Morgan, tweeted: “Tonight Parliament took control of the EU Withdrawal process.”
Labour Leader Jeremy Corbyn said the defeat was “a humiliating loss of authority” for Mrs May.
The UK is due to leave the EU in March 2019, and negotiations are taking place on what their relationship will be in the future.
The EU Withdrawal Bill is a key part of the government’s exit strategy.
Its effects include ending the supremacy of EU law and copying existing EU law into UK law, so that the same rules and regulations apply on Brexit day.
MPs have been making hundreds of attempts to change its wording – but this is the first time one has succeeded.
Ministers had made several efforts to placate the Conservative rebels, and argued that Mr Grieve’s amendment would put time pressure on the government if talks with the EU continued until the last minute.
They pointed to their existing promise of a vote on the final deal and to enshrine the withdrawal agreement in an Act of Parliament.
And minutes before the vote, they offered a last-minute promise of action at a later stage of the bill’s journey through Parliament.
Some Conservatives said this had changed their minds but Mr Grieve said it was “too late”.
Speaking afterwards, the government said: “We are disappointed that Parliament has voted for this amendment despite the strong assurances that we have set out.
“We are as clear as ever that this bill, and the powers within it, are essential.
“This amendment does not prevent us from preparing our statute book for exit day. We will now determine whether further changes are needed to the Bill to ensure it fulfils its vital purpose.”