Theresa May has seen off a Commons rebellion on her flagship Brexit bill after a last-minute concession to pro-EU MPs.
MPs voted by 319 to 303 to reject a House of Lords amendment to the EU Withdrawal Bill that would have ensured the Commons would have the chance to block a "no deal" Brexit.
The legislation must now go back to the Upper House in the latest stage of "parliamentary ping-pong", but the MPs vote essentially means Mrs May has won the battle over a bill which is vital to ensure a smooth withdrawal from the EU.
In dramatic scenes at Westminster, MPs were told shortly before the key vote an official ministerial statement will be issued on Thursday making clear it is ultimately for Speaker John Bercow to decide whether they get a "meaningful vote" on a no-deal withdrawal from the EU.
The concession was accepted by leading pro-EU Tory Dominic Grieve, who was greeted with jeers of "shame" from the opposition benches when he declared he would back the government.
But it was dismissed as a "fudge" by Scottish National Party leader Nicola Sturgeon and described as "meaningless" by Labour whips.
Mr Grieve had tabled an amendment to the bill, requiring MPs to be given the opportunity to approve or reject the government's plans for the next steps in the case that no agreement can be reached with Brussels by Brexit Day in March next year.
With the government instead offering only an unamendable "neutral motion" allowing MPs to take note of the situation, Mrs May was thought to be facing a knife-edge vote.
Downing Street's determination to force their motion through was indicated when Tory whips made clear they would not abide by a parliamentary convention allowing votes to be "nodded through" from ambulances and cars in the courtyard outside if MPs are too ill to physically pass through the voting lobbies.
In the event, several opposition MPs came to Parliament from their sickbeds to oppose the government, as protesters waved EU flags outside.
Bradford West's Labour MP Naz Shah, who has been ill, was pushed in to vote in a wheelchair with a sick bucket on her lap, while pregnant Liberal Democrat deputy leader Jo Swinson voted despite being past her due date.