Prime Minister Boris Johnson suffered a heavy defeat in parliament's upper chamber on Monday over proposed laws which would allow him to breach Britain's EU exit treaty - a plan that has been criticised by US president elect Joe Biden.
The Internal Market Bill is designed to protect trade between Britain's four nations after Brexit. It contains clauses ministers say are needed to protect Northern Ireland's delicate status as part of the United Kingdom, but would also break international law in a "specific and limited" way.
The House of Lords voted to strip those clauses from the bill in a series of defeats for the ruling Conservative Party. The government does not have a majority in the Lords and even some high-profile Conservative members opposed the clauses.
"The government should see sense, accept the removal of these offending clauses, and start to rebuild our international reputation," said Angela Smith, the opposition Labour Party's leader in the Lords.
But ministers are not backing down and intend to try to force the clauses into law later in the legislative process.
The publication of the bill in September provoked criticism with some saying it would wreck Britain's international standing. Biden tweeted on Sept. 16 that anything which endangered the peace accord between the Irish republic and Northern Ireland would threaten Anglo-American trade.
Johnson says the clauses are there to act as a safety net in case ongoing negotiations with the EU fail to work out how goods can flow between Britain, the British province of Northern Ireland, and across the open border with EU member Ireland.
Many instead saw the bill as a negotiating gambit to win concessions from the EU in trade negotiations. Brussels has launched legal action against Britain over the proposals.
"EU cannot ratify a new deal while UK is legislating to break a previous agreement," Irish foreign minister Simon Coveney said on Twitter. "Trust & Good Faith Matters."
The final wording of the bill has to be agreed by both houses, and typically the unelected Lords does not permanently block laws supported by the directly elected House of Commons.
However, the clauses may no longer be needed if talks with the EU on how to make the Irish border work are successful.