Open this photo in gallery Britain's Prime Minister Boris Johnson engages with MPs in the House of Commons in London on Sept. 4, 2019. UK Parliament/Jessica Taylor/Reuters

British Prime Minister Boris Johnson failed in his bid to trigger a snap election after a raucous debate in Parliament on Wednesday, but a vote could still be called later this month once a bill preventing a no-deal Brexit receives royal assent.

Mr. Johnson didn’t receive the required two-thirds support from members of Parliament to call an election. But Labour Party Leader Jeremy Corbyn, whose MPs abstained on Wednesday, said he would agree to an early vote next week after the bill that would avert a no-deal Brexit receives royal assent, raising the potential of the country being plunged into a divisive election campaign just weeks before it is supposed to leave the European Union on Oct. 31.

Tensions over Brexit have been at a boiling point in Parliament all week after Mr. Johnson engaged in a standoff with opposition MPs, and a group of fellow Conservatives, over his insistence that Britain will leave on Halloween with or without a deal. Mr. Johnson has been battered politically and his government has suffered three defeats. But the Tories have jumped ahead of Labour in most opinion polls, which indicates that Mr. Johnson could win an election.

Story continues below advertisement

On Wednesday, a “rebel alliance” of MPs pushed through the no-deal legislation that would force Mr. Johnson to seek a three-month extension if he doesn’t secure an agreement before the deadline. The bill has moved to the House of Lords and could receive royal assent as early as Friday.

Where are we at with Brexit? A guide

In a feisty exchange with MPs Wednesday evening, Mr. Johnson said he would never agree to the terms of the bill because it would hamstring Britain in its talks with the EU. “There is only one way forward for the country,” he said. “The country must decide whether [Mr. Corbyn] or I go to Brussels to sort this out. … In the view of this government, there must now be an election on Tuesday, 15 October.”

Mr. Corbyn shot back that the Prime Minister was being disingenuous and trying to run down the clock to ensure the country left without a deal, which he argued would be disastrous to the economy. “The offer of an election today is a bit like the offer of an apple to Snow White by the wicked queen,” Mr. Corbyn told MPs. “What he’s offering is not an apple of even an election, but the poison of a no-deal.” He added that once the no-deal bill gained royal assent, “then we will back an election so we do not crash out with a no-deal exit from the EU.” However, Mr. Corbyn has been vague about what election date he prefers and senior party officials are worried that if Mr. Johnson won a majority government before Oct. 31, he could revoke the no-deal legislation.

Mr. Johnson has seen his position in Parliament weaken almost daily with one Tory MP defecting to the opposition on Tuesday and 21 others being expelled from the party for siding with the opposition. That’s eliminated his working majority in the House of Commons and left many party faithful furious at his tactics. “We’re pretty upset at the mass expulsion of moderate MPs for voting with their principles,” said Jordan Byrne, a 22-year-old party member from London who led a small demonstration outside Conservative Party headquarters on Wednesday. “We consider it like a declaration of war on one wing of the party.”

Opinion: In the Brexit mess, where does the will of the British people truly lie?

One of the expelled MPs was Ken Clarke, a former senior cabinet minister who has been an MP since 1970. During Wednesday’s debate, Mr. Clarke criticized Mr. Johnson for botching negotiations with the EU and putting the country on the cusp of a no-deal departure. “He’s now Prime Minister,” Mr. Clarke said as he gestured toward Mr. Johnson. “I urge him, stop treating all this as a game.” Another rebel removed from the party was 71 year old Nicholas Soames, a veteran Tory MP and the grandson of Winston Churchill. In a heartfelt address to MPs on Wednesday, Mr. Soames said he would now retire from politics. “I’m truly very sad that it should end in this way," he said fighting back tears. “It is my most fervent hope that this house will rediscover the spirit of compromise, humility and understanding.”

Outside Parliament, Mr. Johnson has proven far more popular. Opinion polls show he has revived the Conservatives’ fortunes since taking over as Leader in July. Recent polls put the Tories 10 points ahead of Labour, and some projections say Mr. Johnson could win a majority government. That’s a far cry from last spring when the party’s support had sunk to just 9 per cent.

Mr. Johnson is hoping that his hard-line stand on Brexit will win voters away from the new Brexit Party led by Nigel Farage, who supports leaving the EU without an agreement. The Brexit Party had been polling far ahead of the Conservatives a few months ago, but that lead evaporated once Mr. Johnson took charge of the Tories and promised to take the country out of the EU on Oct. 31, “do or die.” He has also launched a major pre-election spending spree with £13.8-billion ($22.3-billion) in extra funding for health care, education and policing.

Story continues below advertisement

However, Mr. Johnson runs the risk of alienating moderate Conservatives in Scotland, which does not support Brexit, and in southern England, where the pro-EU Liberal Democrats have surged ahead. The sudden resignation of the Conservative leader in Scotland, Ruth Davidson, was also a major blow to Mr. Johnson, as she was a popular figure and a voice for the party’s moderate wing. Mr. Johnson also faces a worsening economy which could be headed for recession. On Wednesday, Bank of England Governor Mark Carney said the economy had essentially stalled, and a key economic survey showed that activity in the service sector had hit a 10-year low.

“An election is really impossible to call,” said Victoria Honeyman, a lecturer on British politics at the University of Leeds. Prof. Honeyman said the outcome depends on how many Brexit Party candidates stand and whether the vote comes before the Oct. 31 deadline. Mr. Johnson might win, she added, “but a hung Parliament looks more likely.”

Matthew Goodwin, a politics professor at the University of Kent, said Brexit has made the electorate volatile. “While some polls point to a strong Conservative majority, the reality is that Britain is grappling with rates of political volatility that are largely without precedent in the postwar era,” he said. “More people are switching their votes than ever before and public loyalty to the main parties has reached record low levels. … In short, treat any confident predictions with extreme caution.”