A pro-Brexit supporter protests outside Parliament in London, Britain, September 5, 2019. REUTERS/Hannah McKay

LONDON (Reuters) - British Prime Minister Boris Johnson’s government abandoned attempts in the upper house of parliament to block a law aimed at stopping the country from leaving the European Union without a deal.

The move paved the way for Johnson being required to ask the EU for a three-month extension to the Brexit deadline, if he fails to reach a renegotiated transition deal with the bloc by the middle of October.

Johnson has said he is opposed to an extension and that he is prepared to take Britain out of the EU without a deal if necessary.

Conservative Party members of the upper house of parliament had tabled a series of amendments in an attempt to run down the clock on the delay bill and prevent it being passed before parliament is suspended on Monday.

But in the early hours of Thursday, the government in the upper house, known as the House of Lords, announced it was dropping its opposition to the legislation.

Richard Newby, an opposition member of the Lords, who had taken his duvet to parliament in preparation to spend the night discussing the law, said the government dropped its opposition after suffering heavy defeats on some of the proposed amendments.

“There was a realization by those on the other side that this was more than usually stupid, and they were looking stupid, and we needed to find a way forward,” he told BBC Radio.