The government has suffered a heavy defeat in the House of Lords over its controversial Brexit legislation.
The Internal Market Bill contains measures that overrule parts of the UK’s Brexit agreement with the EU.
Peers voted overwhelmingly to remove a section of the bill that would allow ministers to break international law – by 433 votes to 165.
The government said it would reinstate the clauses when the bill returns to the House of Commons next month.
It comes as trade talks continue between EU and UK officials in London as they try to reach an agreement over a future economic partnership.
Former Conservative Party leader Lord Howard was among 44 Conservative peers who voted against the government on Monday night.
He led the calls for the prime minister to “think again” and remove the contentious parts of the UK Internal Market Bill, warning that the government was using the language of “law breakers” everywhere.
Peers also voted to remove another clause, allowing ministers to override parts of the Brexit withdrawal agreement relating to Northern Ireland, by 407 votes to 148. Other clauses in the controversial section of the bill were removed without a vote.
A government spokesman said in a statement: “We will retable these clauses when the bill returns to the Commons.
“We’ve been consistently clear that the clauses represent a legal safety net to protect the integrity of the UK’s internal market and the huge gains of the peace process.
“We expect the House of Lords to recognise that we have an obligation to the people of Northern Ireland to make sure they continue to have unfettered access to the UK under all circumstances.”
The Internal Market Bill is designed to enable goods and services to flow freely across England, Scotland, Wales and Northern Ireland after 1 January – when the post-Brexit transition period runs out.
It gives the government the power to change aspects of the EU withdrawal agreement, a legally binding deal governing the terms of Brexit made earlier this year.
Ministers say the bill would provide a “safety net” in case the EU interprets the agreement, in particular the section on Northern Ireland, in an “extreme and unreasonable” way. The section – known as the protocol – is designed to avoid a hard border on the island of Ireland.
The thumping rejection of the government’s plan is a reminder that there is significant discomfort in Parliament that ministers are prepared to break international law.
A number of Conservative grandees were among those voting to remove controversial clauses in the internal market bill – which has been heavily criticised by the EU.
Even the US president-elect Joe Biden has raised concerns. The bill will now go back to the Commons – where the government has confirmed it will retable the controversial elements removed by peers.
The government insisted the clauses were a crucial safety net and said it had a duty to ensure that Northern Ireland’s businesses and producers continued to have unfettered access to the UK.
MPs are unlikely to discuss the legislation again until December. However, by that point it should be clearer whether a post-Brexit free trade deal can be struck.
UK’s five living former prime ministers – Sir John Major, Tony Blair, Gordon Brown, David Cameron and Theresa May – have all spoken out against the bill.
Labour, the Liberal Democrats, the SNP and the EU argue that – in allowing the government to undo parts of a treaty signed by the EU and UK – it could damage the country’s international reputation and standing.
Labour’s leader in the House of Lords, Baroness Angela Smith, said the government “should see sense” and accept the removal “of these offending clauses”.
She added: “I am sure some in government will initially react with bravado and try to dismiss tonight’s historic votes in the Lords. To do so, however, would underestimate the genuine and serious concerns across the UK and beyond about ministers putting themselves above and beyond the rule of law.”
Irish Foreign Minister Simon Coveney told BBC Newsnight it was “not a surprise” that the bill was “essentially being rejected” by the House of Lords, adding: “It’s as controversial a piece of legislation within the UK as it is outside of the UK.”
He said the government’s “tactic” of legislating to give British ministers “the powers to do what they want to do anyway” has undermined trust in the UK’s trade negotiations with the EU.