A law designed to prevent the UK crashing out of the EU next month has been given an unopposed second reading in the Lords and is on course to be made law.
The legislation to delay Brexit in order to prevent a no-deal departure will undergo detailed further scrutiny in the Upper House on Friday, before returning to the Commons on Monday.
The bill, which Prime Minister Boris Johnson said would “scupper negotiations”, passed all stages in the Commons on Wednesday.
There were fears it could have been stalled in the Lords, with Labour peer and leading lawyer Baroness Kennedy of The Shaws accusing Tory peer Lord True, who had submitted a raft of amendments to the motion, of time-wasting.
The Lords sat until 1.30am on Thursday when chief whip Lord Ashton of Hyde said all stages of the European Union (Withdrawal) (No. 6) Bill would be completed by 5pm on Friday.
One amendment added to the Bill during Wednesday's Commons debate will see Theresa May's defeated Withdrawal Agreement brought before MPs for a vote - if the Bill passes the Lords.
The government's no-deal planning chief Michael Gove said he would vote for that deal if MPs were given another opportunity to pass it.
Mr Gove was asked by Tory Stephen Crabb as he appeared before the Commons Exiting the European Union Select Committee: "If somehow the deal that the previous prime minister negotiated with the EU came back to the House of Commons, would you vote for it?"
The Cabinet minister replied: "Yes."
Mr Gove added: "There were parts of that deal that I didn't like, and I had a particular concern about the backstop for a variety of reasons.
"The Prime Minister's view that we can surgically excise the backstop means that, to my mind, the deal that he would secure as a result of that would be better.
"So while I would happily support and did happily support Theresa May's Withdrawal Agreement, I believe that our new Prime Minister is in a position where the deal that he hopes to secure would be a material improvement."
It paves the way for a snap general election to be called in the near future, with opposition parties saying they'd back one if a Brexit extension can be secured.
Commons Leader Jacob Rees-Mogg said a motion relating to an early general election has been scheduled for consideration in the Commons on Monday.
On Thursday morning, Chancellor Sajid Javid said the only way to escape the "paralysis in Parliament" was to hold an election.
He claimed the government would be unable to negotiate in Brussels if the legislation passed and "so, unfortunately we've got to a position where we have to have a general election because we need to let the British people decide - this paralysis in Parliament cannot continue".
The late night debate in the Lords capped a day of high drama in Westminster, where newly appointed Prime Minister Boris Johnson was defeated twice - his third defeat in 24 hours.
He first lost a vote on whether to hold an emergency debate, before being defeated on a backbench Bill to delay Brexit and finally his plan for a snap general election.
The Government failed to secure the support of two-thirds of MPs for an election, with the Commons voting 298 to 55 – 136 short of the number needed.
One Tory to refuse to back the government was Ken Clarke, who had already had the whip removed over a previous vote, said he would be standing down at the next election.
He said the government should spend the next week "seeing how you give the whip back" to the 21 rebels who had it removed.
On his deselection he said: "For me, given I'm not going to stand at the next election anyway, it's just a slightly weird thing."
Tory MP Dame Caroline Spelman, who also rebelled against the Government in last night's vote, tweeted to say she would be standing down at the next election.
She wrote: "It has been a privilege to serve the constituency over the last 22 years, but the time has come for a new person to represent the interests of Meriden in a new Parliament which will be dominated by the consequences of Brexit."
Shadow chancellor John McDonnell claimed if Labour had backed the PM's motion "we would have handed him power of choosing the date of that election".
He claimed Mr Johnson cannot be trusted and said opposition MPs feared "he could push the date beyond October 31 and we'd be forced into a no-deal Brexit".
Mr McDonnell said Labour would support moves for an election after legislation is passed to block no deal on October 31.
In a hint he could seek a further vote to force an election, Mr Johnson issued a direct plea to Jeremy Corbyn’s MPs as he accused him of being “the first Leader of the Opposition in the democratic history of our country to refuse the invitation to an election”.
“I urge his colleagues to reflect on what I think is the sustainability of this position overnight and in the course of the next few days,” Mr Johnson told the Commons.
The Labour leader had said the Bill must be passed through the Lords and have received Royal Assent before he would entertain the thought of heading to the polls.
He said: “Let the Bill pass and have Royal Assent and then we can have a general election.”
Meanwhile, Mr Johnson was facing continued criticism after Tory MPs – including two former chancellors and the grandson of Winston Churchill – had the party whip withdrawn because they rebelled by helping the effort to prevent a no-deal.
The PM defended the move, telling ITV’s Peston: “These are friends of mine and believe me I take absolutely no joy in any of it but it was very sad and surprising that they should choose to undermine the UK’s ability to get a deal.”
On Thursday, Mr Johnson has a busy schedule, including separate meetings with Israeli PM Benjamin Netanyahu and US Vice President Mike Pence in Downing Street.
Watch the interview in full from ITV's Peston show: