The House of Lords is discussing Labour MP Hilary Benn’s European Union (Withdrawal) (No. 6) Bill and giving it its second reading on Thursday, 5 September.
Mr Benn’s proposed legislation is actually a private member’s bill but must go through the same procedures as government-sponsored bills.
It was given its first and second readings in the Commons on Wednesday and now moves on to being scrutinised by the upper chamber of Parliament, the unelected House of Lords.
Lord Rooker - the former Labour MP for Birmingham Perry Barr Jeff Rooker - is the bill’s sponsor in the House of Lords.
Tory peers had threatened to filibuster against the bill and tabled 86 separate amendments, all of which would have to be debated.
This might have meant the bill running out of time and not being able to get its third and final reading in the Commons on Monday, 9 September.
If the unelected Lords had blocked a bill of such importance that had been passed by the elected MPs it would have caused a constitutional crisis.
But at around 1.30am on Thursday morning the filibustering attempt was averted when a vote, proposed by Labour’s Baroness Smith of Basildon, was passed with the support of rebel Tory peers.
The purpose of the bill is to ensure the UK does not leave the EU on the 31 October without a withdrawal agreement, unless approved by Parliament.
The wording of the bill says that in the event of no Brexit withdrawal bill being passed by Parliament the Prime Minister would be obliged to ask the European Council for an extension to Article 50 and the Prime Minister to accept an extension.
Boris Johnson has said he will not accept an extension beyond 31 October under any circumstances and is trying to push for a General Election on 15 October.
The bill would also require the government to make regular reports to Parliament on the progress of negotiations with the EU.
The bill was subject to minor amendments in committee in the House of Commons.