The UK's bid to drop parts of the Northern Ireland Protocol has cleared its first House of Commons hurdle, amid Conservative Party warnings that the plans are illegal.
MPs voted 295 to 221 to give the Northern Ireland Protocol Bill a second reading, which clears the way for detailed scrutiny in the coming weeks.
UK Prime Minister Boris Johnson claimed the proposed legislation, which gives ministers powers to override parts of the post-Brexit deal on Northern Ireland, could be carried out "fairly rapidly".
Mr Johnson said the proposals could be in law by the end of the year.
But his predecessor in Downing Street, Theresa May, led the criticism from the Tory benches as she delivered a withering assessment of the legality and impact of the Bill.
Ms May made it clear she would not support the legislation and warned that it would "diminish" the UK's global standing.
Other Conservative MPs joined her in expressing concern, although they opted against seeking to block the Bill at its second reading and instead appear likely to seek amendments.
The House of Lords is also expected to contest parts of the Bill, setting up a long showdown between the two houses.
Mr Johnson's government has said the measures to remove checks on goods and animal and plant products shipped from the rest of Britain to Northern Ireland are necessary to protect the Good Friday Agreement and peace and stability.
"You have got one tradition, one community, that feels that things really aren't working in a way that they like or understand. You've got unnecessary barriers to trade between Great Britain and Northern Ireland.
"All we are saying is you can get rid of those whilst not in any way endangering the EU single market."
Mr Johnson said the measures could be in place this year.
"Yes, I think we could do it very fast, Parliament willing."
He said it would be "even better" if the UK could "get some of that flexibility we need in our conversations with Maros Sefcovic", the European Commission Vice President.
"We remain optimistic," Mr Johnson said.
UK Foreign Secretary Liz Truss tried to play down the concerns of MPs by saying the Bill had a "strong legal justification" and the UK remained committed to a negotiated solution.
But Ms May told the Commons: "The UK's standing in the world, our ability to convene and encourage others in the defence of our shared values, depends on the respect others have for us as a country, a country that keeps its word and displays those shared values in its actions.
"As a patriot, I would not want to do anything that would diminish this country in the eyes of the world.
"I have to say to the government, this Bill is not, in my view, legal in international law.
"It will not achieve its aims, and it will diminish the standing of the United Kingdom in the eyes of the world, and I cannot support it."
Conservative former Northern Ireland secretary Julian Smith said: "I fear that this Bill is a kind of displacement activity from the core task of doing whatever we can to negotiate a better protocol deal for Northern Ireland.
"I also fear that it risks creating an impression to unionism that a black-and-white solution is available, when the reality is once this Bill has been dragged through the Lords, and courts, and EU responses and reprisals, compromise will ultimately be needed."
But Conservative former justice secretary Sir Robert Buckland said there was necessity for the government to act because there was a growing and "real threat".
Unionist opposition to the imposition of checks has seen the Democratic Unionist Party refuse to return to the power-sharing executive at Stormont, leaving the territory without a functioning government.
DUP leader Sir Jeffrey Donaldson acknowledged that the Bill was not perfect, but "it empowers ministers to make change where change is necessary to ensure the proper functioning of the UK internal market".
Sir Jeffrey, before the debate, warned the Lords that blocking the legislation would be similar to "wrecking the Good Friday Agreement".
Alliance MP Stephen Farry said: "This is an extremely bad Bill. It's unwanted, unnecessary and, indeed, it's dangerous."
Sinn Fein MP John Finucane called the government's plans "shameful" and said they would mean "more instability" for the region.
"It's very interesting that we are watching a sovereign Parliament debating whether to continue a breach of international law or not," Mr Finucane told BBC Radio Ulster.
A Downing Street spokesman said on Monday that the government had never put a "hard-target date" on when it would hope to see the Bill enacted.