The last-minute concession proved to be enough as MPs voted in favour of removing the Lords amendment from the Bill by 324 votes to 298, a majority of 26.

It means that if no deal has been agreed by the 30th November, ministers must hold a vote in Parliament on "how they plan to proceed" and "seek the approval of the house for that course of action".

Pro-European MPs hailed the concession as significant and believe that it effectively ends the prospect of leaving the European Union without a deal Mr Grieve said: "I'm very happy with the outcome.

The Government has responded positively to our concerns, it has accepted that there needs to be a mechanism for a meaningful vote not only in terms of a deal but also in terms of no deal."

However ministers insisted that the vote will not be binding on the Government and it can still potentially leave the European Union without a deal in place.

"It makes it more difficult if the will of Parliament is against us but it still leaves the Government in charge."

A spokesman for the Brexit department said: "We have not, and will not, agree to the House of Commons binding the Government's hands in the negotiations".

The difficulties facing the Prime Minister and the possibility of a humiliating defeat became increasingly apparent as Mrs May engaged in hushed discussions with Mr Smith at the start of the crunch debate.

Mr Smith then proceeded to do the rounds of speaking to would-be Tory rebels in the chamber as he sought to persuade them to vote with the Government and in favour of removing the peers’ amendment from the European Union (Withdrawal) Bill.

The scale of his task was highlighted by Anna Soubry, the pro-European Tory MP, who attacked whips for targeting her and other rebels in “quiet and dark corridors”.

She also warned that the atmosphere around Brexit meant that “one of our number had to attend a public engagement with six armed undercover police officers”.

As the minutes ticked by and the prospect of a Government defeat loomed larger, Mr Buckland offered Mr Grieve a concession - despite Downing Street having signalled that no such move would be forthcoming.

Mr Buckland said there was “much merit” in parts of Mr Grieve’s amendment but that he needed “more time to think about the other parts”.

He said he was “indicating that the Government is willing to engage positively” with Mr Grieve before the draft legislation returned to the House of Lords for further scrutiny.