Peers have approved a bill designed to stop the Government forcing through a no-deal exit.
The House of Lords approved the European Union (Withdrawal) (No. 6) Bill at third reading without a formal vote.
The legislation requires a delay to Brexit beyond October 31 unless a divorce deal is approved or Parliament agrees to leaving the EU without one by October 19.
It sailed through its final stages in the Lords without amendment and is now expected to receive royal assent on Monday, thereby completing all stages required to become law.
Prime Minister Boris Johnson has previously labelled it the "surrender Bill" and claimed it takes away control of the UK's negotiations with the EU by allowing Parliament to block no-deal.
Closing the debate in the Lords, Brexit minister Lord Callanan said the Bill brought "delay and uncertainty" while undermining the Government's efforts to negotiate the Withdrawal Agreement.
He said it also aimed to tie the Prime Minister's hands when he was seeking to secure the best possible Brexit deal.
But he assured peers the legislation would be presented for royal assent.
"This Bill is about seriously undermining negotiations that could achieve a deal before October 31, frustrating the referendum result and stopping Brexit," Lord Callanan said.
Earlier, peers rejected by 268 votes to 47, majority 221, a bid to remove an amendment included in the Commons, paving the way for MPs to debate Theresa May's final Brexit deal during a Brexit extension to next January.
The amendment, tabled by Labour MP Stephen Kinnock, was only passed after tellers for those voting against it were not put forward.
Tory peers argued this was a mistake which should be corrected to make clear and effective law.
Lord Callanan said the amendment was "confusingly drafted", contradictory to the aims of the legislation and "legally inoperable".
For the Opposition, Lord Goldsmith said it did no harm to keep it in the Bill because there was not time to send it back to the Commons for further consideration due to the "guillotine of prorogation imposed by the Prime Minister".
Conservative peer Lord True also saw his amendment, which aimed to prevent the legislation from coming into force until a general election has taken place in 2019, rejected by 283 votes to 28, majority 255.
Lord True had argued: "How many more times must the British people be asked to take a delay?
"How many more times must they tolerate those who wished to change the policy which Parliament has agreed, the vote that Parliament has made that this country should leave the European Union - enacted on the face of the statute book - on October 31?
"How much more must they take from those who want this country to remain and want it to stop?
"I think there will be a limit to the tolerance of many people in this country and I beseech all those involved to allow the cleansing balm of a general election to allow all those, whatever their views, to put their case to the people."
Labour described Lord True's proposal as a "wrecking amendment" and successfully led the opposition to it.