Media playback is unsupported on your device
A proposed law giving Boris Johnson's government the power to override parts of the Brexit agreement with the EU has passed its first hurdle in the Commons.
MPs backed the Internal Market Bill by 340 votes to 263.
Ministers say it contains vital safeguards to protect Northern Ireland and the rest of the UK, if negotiations on a future trade deal break down.
But critics, including a number of Tory MPs, warned it risks damaging the UK by breaching international law.
Although the government has a majority of 80 in the Commons, it is braced for rebellions in the coming weeks as the legislation receives detailed scrutiny.
Several prominent Conservatives, including former Chancellor Sajid Javid, have said they could not support the final bill unless it is amended, with a number expected to have abstained in Monday's vote.
'Straight-dealing'
Sir Roger Gale, the Tory MP for North Thanet in Kent, told the BBC's Newsnight he had voted against the bill as a "matter of principle" to uphold international law.
"I think that this is damaging our international reputation for honest and straight-dealing at a time when we are about to embark on a series of trade negotiations. I took a view that you fight this tooth and nail at every step."
He suggested other colleagues were "holding their fire" until later in the bill's passage, with a group led by ex-minister Sir Bob Neill pressing for a "parliamentary lock" on the government's ability to exercise the powers.
"I'm not remotely surprised that I am a tiny minority. I think that may change next Tuesday," he added.
Bill's remit
The bill is designed to enable goods and services to flow freely across England, Scotland, Wales and Northern Ireland when the UK leaves the EU's single market and customs union on 1 January.
But, controversially, it gives the government the power to change aspects of the EU withdrawal agreement, a legally-binding deal governing the terms of the UK's exit from the EU earlier this year.
Ministers say this is a failsafe mechanism in case the EU interprets the agreement, in particular the Northern Ireland Protocol designed to avoid a hard border on the island of Ireland, in an "extreme and unreasonable" way.
Boris Johnson's government has a hefty majority. It was never going to lose Monday night's vote in the Commons.
Downing Street calculates that most of the public won't pay that much attention to yet more Westminster argy-bargy about the Brexit process.
In turn, many Tory MPs are sure that the wrangling over the UK Internal Market Bill won't filter through to their constituents.
And where it does, they would much more likely take the side of the government taking a tough line with the EU than share the concerns of former prime ministers or august lawyers foaming about the government's behaviour.
And yet - first off, to state the obvious, opposition from former occupants of No 10, former chancellors and former cabinet ministers is not exactly a sign of peace and harmony.
But the resistance to No 10 goes beyond the usual suspects this time.
During a five-hour debate, Mr Johnson claimed the EU's current approach could lead to excessive checks and even tariffs on goods moving from Great Britain to Northern Ireland.
He said the bill would ensure the UK's "economic and political integrity", accusing the EU of making unfair demands to "exert leverage" in the trade talks - including a threat to block food exports.
Media playback is unsupported on your device
But ministers also said they would listen to concerns, insisting that the powers being sought would only be used if other legal avenues had been exhausted and only if MPs explicitly voted to activate them.
A government spokesman said it was vital the bill - which is expected to face stern opposition in the House of Lords - becomes law by the end of the year when EU law will cease to have effect in the UK.
"It will protect the territorial integrity of the UK and the peace in Northern Ireland, safeguarding trade and jobs across all four corners of the UK following the end of the transition period," he said.
The PM also held a call with Conservative members of the House of Lords on Monday night.
Labour said the PM was reneging on a deal he himself signed earlier this year, and on which Conservative MPs campaigned in the 2019 election, and was "trashing" the UK's reputation.
But the Commons also voted against a Labour amendment to reject the bill entirely by 349 votes to 213.
MPs will now begin detailed scrutiny of the bill on Tuesday with Conservative MPs seeking further assurances that the UK will not betray its treaty obligations.