Theresa May has avoided an embarrassing defeat by striking a last-minute deal with Conservative rebels.

The concession was prompted by an amendment from Dominic Grieve which demanded MPs had a bigger say on the final withdrawal agreement.

And when justice minister Phillip Lee resigned in the hours before the vote to oppose Mrs May's Brexit strategy, the government realised it faced defeat.

But after the prime minister personally assured a group of around 15 rebels that Mr Grieve's amendment would be partially adopted into the Bill before it went back to the Lords the rebels backed down.

In the end MPs voted by 324 to 298 to reject a House of Lords amendment to the EU (Withdrawal) Bill which would have given MPs the power to tell the prime minister to go back and renegotiate the Brexit deal.

But Mr Grieve's amendment demands that if there is no agreement with Brussels before the end of November MPs would vote on a motion setting out what should happen next. And if there is still no agreement before February 15 parliament would vote on whether to take over the Brexit process.

If confirmed, the move represents a dramatic climbdown from Mrs May's original plan to offer MPs a 'take it or leave it' vote to accept the withdrawal agreement or leave the EU without a deal. And it makes a 'no deal' scenario less likely.

The concession seems to be a victory for the Remain camp and last night Tory Brexiteers were concerned the climbdown could damage the prime minister's ability to walk away from the negotiations if the EU offer was not good enough.

One Tory Leaver said: 'We need to know more about what exactly the prime minister has told the rebels. I have to say I do feel a bit uneasy about what deal they have got because they seem very pleased with themselves.

'If she has given too much away I think there will be real anger towards her.'

Mrs May is now expected to get through the remaining Brexit votes unscathed, with a potentially explosive clash over the customs union already defused. But she faces a gruelling bout of 'parliamentary ping-pong' with the Lords, as the Bill bounces back and forth in the coming weeks.