LONDON — Prime Minister Boris Johnson survived a rebellion among lawmakers from his Conservative Party on Monday as the Parliament advanced Brexit legislation even after the government admitted that it would violate international law.
The vote, 340 to 263, came after a fierce debate in the House of Commons that demonstrated that Britain, despite having cast off from the European Union eight months ago, has yet to put the furies of Brexit behind it.
It is only the first step for the legislation, which would nullify parts of a landmark agreement that Mr. Johnson struck with the European Union last fall. That deal paved the way for Britain to leave the bloc after 44 years.
Mr. Johnson, with an 80-seat majority, was never likely to lose this first vote. But the divisive debate sets in motion a politically perilous period for the prime minister, both with his own party and with the European Union. European officials have warned that the legislation would torpedo talks for a post-Brexit trade deal.
With further legislative hurdles to come, analysts said the danger was less a quick defeat than a gradual leaching away of support that could leave Mr. Johnson weakened at a time when his government is battling a resurgence of the coronavirus and the effects of a lockdown-ravaged economy.
“If you put together concerns about the government’s handling of the virus, with concerns about the economy, and concerns about the effects on individual liberties of the lockdown, Boris Johnson is making a lot of people unhappy,” said Tim Bale, professor of politics at Queen Mary University of London.
Britain also faces other international repercussions, not least with the United States, where congressional Democrats have warned Mr. Johnson that his move could scuttle a trans-Atlantic trade deal because it undermines the Good Friday Agreement, which ended decades of sectarian violence in Northern Ireland.
Mr. Johnson’s aggressive move to rewrite provisions of the treaty relating to Northern Ireland has drawn a torrent of criticism from prominent Conservative figures, including former Prime Minister David Cameron, who said on Monday he had “misgivings” about the government’s proposal.
“Passing an act of Parliament and then going on to break an international treaty obligation is the very, very last thing you should contemplate,” Mr. Cameron told reporters, becoming the latest of five former prime ministers — three of them Conservatives — to speak out against Mr. Johnson’s plan.
The government also lost the support of two former cabinet members — Sajid Javid, who was chancellor of the Exchequer until Mr. Johnson forced him out last February, and Geoffrey Cox, a former attorney general.
Mr. Cox said he would vote against the law because it would do “unconscionable” harm to Britain’s global standing. His defection was particularly noteworthy because Mr. Cox favored Brexit and was the government’s top legal adviser when Mr. Johnson negotiated the withdrawal agreement.
In the heat of the debate, Ed Miliband, a former leader of the Labour Party, reminded Mr. Johnson that he had signed, promoted and ran his election campaign on the agreement he was now proposing to rewrite.
“What incompetence! What failure of governance!” Mr. Miliband bellowed, as Mr. Johnson shook his head in disgust. “And how dare he try and blame everyone else.”
Despite the boldface names lining up to oppose the law, there was no sign that Mr. Johnson planned to back down. He told Parliament the legislation was an “insurance policy” against a European Union that might interpret the withdrawal agreement in a way that could break up the United Kingdom.
Threatening to rip up an agreement with the European Union plays well with the hard-line Brexiteers in his party. And there are still three-and-a-half months before the Dec. 31 deadline for a trade deal with Brussels, which means Mr. Johnson could always compromise later.
Mr. Johnson pursued a similar strategy of brinkmanship this time last year, threatening to leave the European Union without a withdrawal agreement, which prompted a similar, if more widespread mutiny, in his party.
The prime minister expelled 21 rebels for defying the government, including Conservative grandees like Kenneth Clarke, a former chancellor of the Exchequer, and Nicholas Soames, a grandson of Winston Churchill.
Mr. Johnson kept threatening a no-deal Brexit until October, when he met with Leo Varadkar, then the prime minister of Ireland, and suddenly cut a deal on the treatment of Northern Ireland that opened the door to a broader agreement with Brussels.
It is that deal that Mr. Johnson now proposes to renege on, if Britain is unable to agree to long-term trade arrangements with the European Union. The government says the legislation is intended to provide a “safety net” for businesses in Northern Ireland, which send and receive goods from the rest of the United Kingdom.
Few analysts expected more than a small band of Conservative lawmakers to abstain or vote against the government on Monday. But more may vote for an amendment — to be introduced next week by a Conservative member, Bob Neill — that would block the government from using the provisions of the bill that would break the law by nullifying the so-called Northern Ireland protocol, without Parliament’s approval.
Even that rebellion seems likely to fall short, however, given the size of Mr. Johnson’s majority and the reluctance of Conservative lawmakers to fall out with a prime minister who delivered a landslide victory less than a year ago.
If the legislation gets through the House of Commons, it goes to the House of Lords, where Michael Howard, who sits in that chamber and who is a former head of the Conservative Party, predicted it would run into a buzz saw of opposition. Still, the Lords rarely thwart bills that have passed the lower house.
For all the fireworks, some analysts still said they believed Mr. Johnson would ultimately come to terms with Brussels. The prime minister’s threats to break off talks, breach international law or accept a no-deal Brexit are all intended, they said, to prepare the ground for a compromise.
“This is a signal to his Brexit ultras that he is playing hardball with the European Union, which will make it easier when he eventually has to make concessions to cut a deal,” Professor Bale said.
The risk for Mr. Johnson, analysts said, is that he could miscalculate the reaction from the European Union, which has so far been measured, or that his government no longer has the bandwidth to conclude a trade deal — a scenario that is not implausible given its growing urgency the virus.
“It is perfectly possible to slide into war,” Professor Bale said.