LONDON – On a day of humiliating setbacks, British Prime Minister Boris Johnson suffered a major defeat in Parliament on Tuesday night as rebellious lawmakers voted to seize control of the Brexit agenda, prompting the embattled prime minister to say he would call for a new general election.

The 328 to 301 vote, made possible by fellow Conservatives who turned their back on Johnson’s pleas, cleared the way for his opponents to introduce a bill Wednesday that would seek to prevent Britain from leaving the European Union without a deal Oct. 31. It was a momentous day in Britain’s centuries-old Parliament as the legislature rose up to successfully challenge the power of the prime minister and his government over vital Brexit policy.

Even if they can force Johnson to seek a delay to that deadline, any extension would have to be approved by each of the other 27 EU nations.

The cross-party rebels are determined to prevent a “no-deal” Brexit because of fears it would gravely damage the economy and plunge Britain into a prolonged recession while also leading to possible medicine and food shortages. The vote came hours after Johnson suffered a key defection from his party, costing him his working majority in Parliament.

On a day of high drama and acerbic debate in the House of Commons, lawmakers returned from their summer recess to confront Johnson over his insistence that the U.K. leave the European Union on Oct. 31, even without a withdrawal agreement to cushion the economic blow. Many shouted, “Resign!” and protesters gathered outside Parliament to call for Britain to remain in the EU.

A new general election would take Britain’s future directly to the people for a third general election in four years. It is not clear Johnson would immediately get the two-thirds majority in Parliament needed to call a fresh vote because opponents are wary he might postpone the election date until after Brexit has taken place.

“I don’t want an election but if MPs vote tomorrow to stop the negotiations and to compel another pointless delay of Brexit, potentially for years, then that will be the only way to resolve this,” Johnson said minutes after he lost the vote in Parliament.

Earlier Tuesday, two other prominent Conservatives signaled their intention not to seek re-election rather than bend to Johnson’s will. Former Cabinet minister Justine Greening and former Foreign Office Minister Alistair Burt also signaled their intention to stand down.

Jeremy Corbyn, leader of the main opposition Labour Party, lambasted the weakened Johnson and accused him of “riding roughshod” over the constitution in order to crash Britain out of the EU without a deal.

He said he will not agree to a new election until legislation preventing a “no-deal” exit is in place.

“He isn’t winning friends in Europe. He’s losing friends at home. His is a government with no mandate, no morals and, as of today, no majority,” Corbyn said.

Johnson, who became prime minister in July, has tried to crack down on members of his Conservative Party who oppose his Brexit plans, warning they would be expelled from the party if they supported parliamentary efforts to block or delay the withdrawal.

Dominic Grieve, who was attorney general in David Cameron’s government, says the expulsion threats demonstrate Johnson’s “ruthlessness.” Greening said she feared her beloved party was “morphing into Nigel Farage’s Brexit Party,” in a reference to the U.K.’s veteran euroskeptic and the party he leads. Former Treasury chief Philip Hammond warned of the “fight of a lifetime” if officials tried to prevent him from running in the next election. All three oppose Johnson.

Time to block a “no-deal” departure is running short. Johnson last week maneuvered to give his political opponents even less time to block a chaotic no-deal Brexit, getting Queen Elizabeth II’s approval to suspend Parliament. His outraged critics sued, and attorneys arguing the case at a court in Scotland completed submissions Tuesday. The judge could rule as soon as Wednesday.

A no-deal Brexit will sever decades of seamless trade with Europe’s single market of 500 million people. Economists warn of disruptions in commerce, and the U.N. trade agency UNCTAD estimated Tuesday a no-deal Brexit will result in U.K. export losses of at least $16 billion. Leaked government documents predicted disruptions to the supply of medicine, decreased availability of fresh food and even potential fresh water shortages because of disruption to supplies of water treatment chemicals.

Johnson insists the potential for leaving without a deal must remain as a bargaining chip in negotiations with the EU.

Though the EU is Britain’s biggest trading partner, a no-deal Brexit would also hurt Europe – a fact not lost on Brussels. Johnson’s supporters said lawmakers were weakening the government’s negotiating position with the EU.

“The one thing that has helped focus minds in the EU is that we’re leaving come what may and we’ve got a very focused task of what a good deal would look like,” Foreign Secretary Dominic Raab told ITV. “But the lingering doubt they’ve got is: Will the shenanigans in Parliament somehow lead to the cancellation or the delay of Brexit?

“That’s encouraging them, and weakening our position to actually get the deal we all want.”

The bloc insists it won’t renegotiate the agreement struck with former Prime Minister Theresa May, which Johnson considers unacceptable.

Johnson has told French President Emmanuel Macron and German Chancellor Angela Merkel he could come up with a better alternative to the main sticking point in the stalled negotiations – the deadlock over how to ensure there are no customs checks between the U.K.’s Northern Ireland and EU member Ireland after Brexit.

Only 58 days from exit, the EU said it had received no proposals from the British government aimed at overcoming the impasse.

European Commission spokeswoman Mina Andreeva said the EU’s executive body, which supervises talks on behalf of Britain’s 27 European partners, is operating on the “working assumption” that Britain will leave the bloc Oct. 31.