
The government has seen off a rebellion by Conservative MPs over Parliament's role in the Brexit process, winning the crunch vote by 319 to 303.
The would-be rebels wanted to ensure MPs had the power to stop the UK leaving the EU without a deal.
With the vote on a knife-edge, assurances were accepted that MPs will have a meaningful say in the process.
Dominic Grieve, leader of the would-be rebels, said the "sovereignty of Parliament" had been acknowledged.
Another potential rebel Nicky Morgan said she did not wish to see Mrs May "destabilised or undermined" ahead of next week's summit of EU leaders.
But she warned of further battles to come over the UK's trade and customs arrangements with the EU and suggested relationships between MPs had been "strained almost beyond belief".
The UK is due to leave the European Union on 29 March 2019 and negotiations have been taking place over the terms of its departure.
The government has been at odds with the House of Lords in the long-running row over what happens if the UK cannot reach a deal with the EU, or if MPs reject whatever deal the government agrees with the EU.
But, following Wednesday's vote, the government is a step closer to getting its EU (Withdrawal) Bill - which will end the supremacy of EU law and prepare the UK's statute book for Brexit day - into law.
The Commons vote had been expected to be tight and the government eventually prevailed by a majority of 16.
Six Tory MPs - Ken Clarke, Anna Soubry, Sarah Wollaston, Heidi Allen, Antoinette Sandbach and Phillip Lee - rebelled while four Labour MPs backed the government and six other Labour MPs abstained, as did Kelvin Hopkins, who sits as an independent after having the whip withdrawn.
Ms Wollaston tweeted that she was disappointed with the outcome.
One Labour MP, Naz Shah, voted in a wheelchair after being released from hospital amid Labour claims that normal arrangements sparing unwell MPs from having to enter the chamber had been abandoned.
The sticking points
The debate centred on what happens in three Brexit scenarios:
- If MPs vote down the UK-EU Brexit deal
- If Theresa May announces before 21 January 2019 that no deal has been reached
- If 21 January passes with no deal being struck.
Under these circumstances, the government has said, a minister will make a statement in Parliament, setting out the proposed next steps.
MPs will then vote on this statement. According to the government, this vote should be "on neutral terms", with MPs simply noting what has been said.
But the Lords' amendment goes further, saying MPs should have to "approve" the minister's statement.
The Department for Exiting the European Union has now conceded that it will be up to Commons Speaker John Bercow to decide the matter at the time.
The concession
Speaking in the Commons, Dominic Grieve said while he regarded Brexit as a "historic mistake", he said he respected the vote of the British public to leave.
He said the issue of the meaningful vote was about giving "assurances to the House and many, many people in the country who are worried about this process and how it will end".
If Parliament wished to "speak with one voice" and exert its influence in the face of a non-deal scenario, it "has the power to do it".
Mr Grieve said he had insisted on a key paragraph in the government statement accepting "it is open to MPs to table motions and debate matters of concern and that, as is the convention, parliamentary time will be provided for this".
Fellow Tory Jonathan Djanogly said he had voted with the government after what he said a "good compromise" had been agreed which effectively gave Parliament a "veto" over the UK leaving without a deal.
"Everyone likes to see winners and losers but that is not how it works," he said of the outcome.
Haven't MPs already voted on this?
Yes - last week the Commons overturned a differently-worded House of Lords amendment on the same subject, after would-be rebels who support giving Parliament a greater role were given assurances that the government would take their concerns into account.
But the would-be rebels were unhappy at the government's subsequent offer to meet their concerns, describing it as a "slap in the face".
On Monday the government was defeated by 119 votes in the Lords, who tabled a new amendment which would mean MPs have to "approve" whatever the government decides to do if there is no Brexit deal.