LONDON (Reuters) - The lower house of the British parliament on Wednesday approved legislation which would force Prime Minister Theresa May to seek a Brexit delay to prevent a potentially disorderly departure on April 12 without a deal.

Speaker of the House of Commons John Bercow speaks in the Parliament in London, Britain April 3, 2019, in this screen grab taken from video. Reuters TV via REUTERS

The legislation, put forward by opposition Labour lawmaker Yvette Cooper, was rushed through all of its stages in the House of Commons in less than six hours. It was approved at the final stage by 313 votes to 312. It now has to pass the upper chamber, the House of Lords.

May said on Tuesday she would seek another short extension to Brexit beyond April 12, in order to try and work with Labour leader Jeremy Corbyn to get her thrice-rejected Brexit deal approved by parliament.

Cooper said the legislation was still needed to set out a clear process for how decisions are taken over the length of any extension. The bill requires May to get parliament’s approval for the detail of any delay and allows lawmakers to propose a different length of extension.

“Perhaps crucially it would demonstrate to the EU parliamentary support for what the prime minister is asking for,” she told parliament during the debate on the legislation.

Any further delay to Britain’s exit would need unanimous approval from EU leaders.

To avoid an abrupt no-deal Brexit on April 12, May must present a summit of EU leaders next Wednesday with a plausible strategy to win approval in parliament for the Withdrawal Agreement that she negotiated with Brussels.

May has said that if she cannot agree a unified approach with Corbyn, then the government would come up with a number of options on the future relationship with the EU and put them to parliament in a series of votes.

The legislation was pushed through as part of a process which has seen lawmakers seize control of parliamentary time in order to influence the way forward on Brexit. It is very unusual for legislation which is not proposed by or supported by the government to be passed by parliament.

The government said there were many flaws with the legislation, including the lack of time available for all the steps it sets out, and had concerns about the precedent it set.

Pro-Brexit Conservative lawmaker Bill Cash described it as “a constitutional revolution”.

“This is a grave moment in our constitutional history. I think the Bill is reprehensible ... I think it is a disgrace that it was brought in,” he told parliament ahead of the votes.

It was unclear when the legislation would be debated in the House of Lords, where legislation usually passes more slowly and opponents could seek to filibuster it, but it could be as soon as Thursday.

Conservative lawmaker Oliver Letwin, who was also involved in putting forward the legislation, said earlier on Wednesday there was “overwhelming support in the House of Lords” for it and he anticipated it would pass through the Lords rapidly.

“The House of Lords has in fact already passed a motion which provides for the expeditious consideration of exactly this form of bill,” he said.