Britain's Prime Minister Boris Johnson gestures as he speaks in the House of Commons in London during the debate for the EU Withdrawal Agreement Bill, Tuesday Oct. 22, 2019. British lawmakers have rejected the government’s fast-track attempt to pass its Brexit bill within days, demanding more time to scrutinize the complex legislation and throwing Prime Minister Boris Johnson’s exit timetable into chaos. (Jessica Taylor, UK Parliament via AP)

LONDON — British Prime Minister Boris Johnson won one vote and lost another in Parliament on Tuesday, a result that inches him closer to his goal of leading Britain out of the European Union — but effectively guarantees it won’t happen on the scheduled date of Oct. 31.

The good news for the prime minister was that lawmakers — for the first time since Britons chose in 2016 to leave the EU — voted for a Brexit plan, backing by 329-299 a bill to implement the agreement Johnson struck with the EU last week.

But minutes later, legislators rejected his fast-track timetable to pass the bill, saying they needed more time to scrutinize it. The vote went 322-308 against the government.

Johnson responded by stopping the legislation dead in its tracks. He had planned to push it through the House of Commons by Thursday. But he said he would "pause" the legislation until the EU had decided whether to agree to delay Britain's departure.

With the Brexit deadline looming and British politicians still squabbling over the country's departure terms, Johnson was forced to ask the EU for a three-month delay to Britain's departure date.

He did that, grudgingly, to comply with a law passed by Parliament ordering the government to postpone Brexit rather than risk the economic damage that could come from a no-deal exit.

European Council President Donald Tusk said earlier Tuesday that EU leaders "will decide in coming days" whether to grant Britain that extension — what would be the third. French Foreign Minister Jean-Yves Le Drian told French lawmakers Tuesday that he sees "no justification" at this stage for a further delay.

But Tuesday's votes make it all but impossible for Johnson to fulfil his often-repeated promise to lead Britain out of the EU on Oct. 31.

Johnson earlier said he could call a vote on holding a snap general election if Parliament blocked his plans and Brexit was delayed much longer. He hopes an election might break the political deadlock over Brexit that has dragged on for more than three years since British voters opted to leave the EU.

"I will in no way allow months more of this," said Johnson, who took power in July vowing that the U.K. would leave the bloc on the scheduled date of Oct. 31, come what may.

"If Parliament refuses to allow Brexit to happen and instead ... decides to delay everything until January or possibly longer, in no circumstances can the government continue with this (bill)," he said.

Last week Johnson struck a divorce deal with the 27 other EU leaders, but on Saturday he failed to win Parliament's backing for it. His only remaining hope of leaving on time was to get lawmakers to pass the Brexit-implementing bill into law before the scheduled departure date, nine days away.

Johnson said backing the bill would allow lawmakers to "turn the page and allow this Parliament and this country to begin to heal and unite."

The Brexit deal sets out the terms of Britain's departure, including measures to maintain an open border between the U.K.'s Northern Ireland and EU member Ireland. It also enshrines the right of U.K. and EU citizens living in the other's territory to continue with their lives, and sets out the multibillion pound (dollar) payments Britain must make to meet its financial obligations to the EU.

But the deal does not cover the nitty gritty of future relations between the U.K. and the EU: Instead, it confirms a transition period lasting until at least the end of 2020 — and possibly 2022 — in which relations will remain frozen as they are now while a permanent new relationship is worked out.

If Britain leaves the EU without a deal, there will be no transition period, uncertainty for millions of citizens and a host of new tariffs, customs checks and other barriers to trade on Day 1. Most economists say that would send unemployment rising, the value of the pound plummeting and plunge the U.K. into recession.

Many lawmakers felt that three days was not nearly enough time for scrutiny of the 115-page bill. Major bills usually take weeks or months to pass through Parliament, giving time for line-by-line scrutiny by lawmakers.

Before Tuesday's votes, Green lawmaker Caroline Lucas tweeted that lawmakers "had more time to debate the Wild Animals in Circuses Act (affecting 19 animals) than they will to decide the future of 65 million people. It's hard to think of anything which better illustrates this Govt's contempt for people, Parliament & democracy."

After the votes, many lawmakers urged Johnson to push ahead with the bill after securing a delay to Brexit. Opposition Labour Party leader Jeremy Corbyn urged the prime minister to "work with us all of use to agree a reasonable timetable" for its passage.

If Johnson does press ahead with the bill, opposition lawmakers plan to seek amendments that could substantially alter the bill, for example by adding a requirement that the Brexit deal be put to voters in a new referendum, or by requiring the government to extend the transition period until a new trade deal with the EU has been agreed.

The government says such major amendments would wreck its legislation, and it would withdraw the bill if the opposition plan succeeds.

___

Associated Press writers Gregory Katz in London and Lorne Cook in Brussels contributed to this report.