The EU has threatened British Prime Minister Boris Johnson with legal action over his plans to scrap parts of the Brexit withdrawal agreement, giving him three weeks to back down. The European Commission urged Mr Johnson's government to amend the Internal Market Bill by the end of September or "risk the ongoing future relationship negotiation". Emergency Brexit talks took place in London on Thursday with the EU and British officials. An influential group of British backbench MPs demanded a hardline approach that could end hopes of a trade deal between the two sides. After the talks, UK chief negotiator David Frost defended Britain's stance. Mr Frost said the UK had "consistently made proposals that provide for open and fair competition, on the basis of high standards, in a way that is appropriate to a modern free-trade agreement between sovereign and autonomous equals". The talks came after the British government indicated that it would undercut parts of the Brexit agreement despite admitting it would mean acting outside international law. The move sparked fury in Brussels and divided opinion in the UK’s Parliament, where Mr Johnson’s substantial majority was built on his promise to deliver Brexit after a 2016 referendum narrowly voted in favour of leaving the EU. The withdrawal agreement, a legally binding document, came into force in February after a deal struck between both sides. The government has now said it plans to breach terms of the agreement to diminish the influence of the EU over decisions made in Northern Ireland from next year. The opposition and former prime minister Theresa May have criticised the government over the move, but it has the backing of the influential pro-Brexit European Research Group of MPs. On Thursday, the EU warned that London's plan to rewrite an international treaty was jeopardising efforts to sign a wide-ranging trade agreement. Michel Barnier, the EU’s chief negotiator, told officials on Wednesday that those negotiations had made no progress. Bernard Jenkin, a senior figure in the group in the ERG, told the BBC: “I think it’s perfectly reasonable we signed the best of a bad job to make progress, but it was on the basis that the EU would conduct their negotiations with good will and in good faith, and they have not done so. “It looks like they are going to try to use the withdrawal agreement as provisions for continuing to carry on punishing the UK for leaving the EU." Mr Jenkin justified attempts to change the withdrawal agreement by saying that leaving the EU was “totally exceptional” and like a “country becoming independent from an empire”. Britain signed the treaty and formally left the EU in January, but remains within the single market until the end of this year under an agreement. Mr Frost repeat the UK's position on Thursday after what he described as "useful exchanges". But he stressed that "a number of challenging areas remain and the divergences on some are still significant". After the hectic twists and turns of the Brexit crisis, Europe's leaders have been handed an ultimatum by Britain: accept the breach of the treaty or prepare for a messy divorce when Britain finally disentangles at the end of the year. Talks on a new trade deal have so far been snagged by state aid rules and fishing. Without an agreement, nearly $1 trillion (Dh3.67tn) in trade between the EU and Britain could be thrown into chaos at the start of 2021. It is economic damage neither side needs as they try to limit the damage from the coronavirus crisis. The latest dispute is over the British-ruled region of Northern Ireland, which shares a land border with EU member Ireland. Under the 1998 Good Friday peace agreement that ended decades of violence there, the border must stay open. To ensure that, Britain's EU divorce agreement calls for some EU rules to continue to apply in Northern Ireland. Now the UK wants the power to override them. US House of Representatives Speaker Nancy Pelosi said any potential trade deal between the UK and America would not pass Congress if Britain undermines the Good Friday peace pact. "The Good Friday Agreement is treasured by the American people and will be proudly defended in the US Congress," Ms Pelosi said. European diplomats said Britain was playing a game of Brexit chicken by threatening to wreck the process and challenging Brussels to change course. Some fear Mr Johnson may regard a no-deal exit as useful distraction from the coronavirus crisis. Irish Prime Minister Micheal Martin called on Britain to drop its plan to breach the divorce deal, telling the <em>Financial Times</em> that it was not clear if Mr Johnson wanted a trade deal.