Boris Johnson has said he will press on “undaunted” with his Brexit strategy despite MPs backing the principle of a further delay to the process.
The PM vowed to introduce legislation needed to implement his “excellent” agreement in Parliament next week.
But he will have to ask the EU for an extension beyond 31 October after MPs backed a motion designed to rule out a no-deal exit by 322 votes to 306.
The EU said it was up to the UK to “inform it of the next steps”.
Ministers have signalled a vote on the PM’s revised Brexit agreement could now take place on Monday, depending on what the Speaker decides.
During the first Saturday parliamentary sitting for 37 years, MPs delivered a blow to the PM’s Brexit strategy.
They backed a motion, tabled by independent MP Sir Oliver Letwin, which “withholds approval” for Boris Johnson’s Brexit deal until legislation implementing it has been passed.
It was due to be followed by a vote on the main government motion – whether or not to back the deal.
The motion – amended because of the vote on Sir Oliver’s amendment – was approved without MPs going into the division lobbies.
A vote on a cross-party amendment on preventing a no-deal referendum and holding a second referendum was also dropped.
The defeat is a major setback for the PM, who has repeatedly insisted that the UK will leave at the end of the month come what may.
But Mr Johnson said he was not “daunted or dismayed” and he still believed the best thing for the UK was to leave the EU later this month on the basis of his “excellent deal”.
“I will not negotiate a delay with the EU and neither does the law compel me to do,” he said.
He said he did not believe the EU would be “attracted” by a further delay and his policy remained “unchanged”.
But Labour leader Jeremy Corbyn said the defeat represented an “emphatic” rejection of the PM’s strategy and he must now comply with the law in seeking a further extension.
Sir Oliver Letwin said the move meant the UK would not “crash out” of the EU on 31 October without a deal if the necessary legislation was held up or derailed.
His motion was supported by 10 former Tory MPs who have either quit or been forced out of the party over Brexit, including Philip Hammond, David Gauke and Amber Rudd.
The Democratic Unionists, who backed the Letwin amendment, said the delay would allow for further scrutiny of the PM’s agreement – emphasising that its support would depend on preserving the “constitutional and economic” integrity of the UK.
But Brexiteers reacted with anger, Tory MP Peter Bone saying it had been “a complete waste of time”.
Under the terms of the Benn Act passed last month, the PM is legally obliged to ask the EU for a further delay if Parliament has not approved an agreement by then.