Boris Johnson's contentious bill to override parts of the Brexit deal has passed a major hurdle in parliament.
MPs backed the Internal Market Bill by 340 votes to 263.
Several Tory backbenchers earlier vowed to either abstain or vote against the government, after a minister admitted the bill "does break international law".
MPs will begin detailed review of the bill on Tuesday, with votes expected next week on amendments to the Northern Ireland provisions which some Tories may back.
Mr Johnson, who has a majority of 80 in the Commons, kept the vast majority of his party on side by saying the most controversial part of the bill may "never be invoked" if a trade deal is struck with Brussels.
The bill aims to end the legal legitimacy of the Northern Ireland protocol - contained within the Withdrawal Agreement - in areas such as customs and state aid and financial assistance.
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.
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.
The prime minister also accused Brussels of going to "extreme and unreasonable lengths" over the part of the Withdrawal Agreement affecting Northern Ireland.
The PM said it is "necessary" to row back on aspects of a Brexit agreement - and in the process breach international law - in order to "stop a foreign power from breaking up our country".
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.
Shadow business secretary Ed Miliband, who was standing in for Sir Keir Starmer said the prime minister Johnson had only himself to blame for signing up to the Withdrawal Agreement.
“Either he wasn’t straight with the country about the deal in the first place or he didn’t understand it,” Mr Miliband said.
“Because a competent government would never have entered into a binding agreement with provisions it could not live with.”
Labour’s amendment to block the Internal Market Bill from receiving a second reading was defeated by 349 votes to 213, majority 136.
The bill passed its first major hurdle known as "second reading", but will still have to clear several other stages before becoming law and as the transition deadline nears.