The British government has agreed in principle to withdraw contentious clauses from Brexit legislation that have caused a furore with the EU, as part of a deal over measures for Northern Ireland.
The measures in the UK Internal Market Bill would have overridden parts of the binding EU divorce deal concerning trading arrangements for Northern Ireland, breaching international law.
The UK has also pledged not to introduce further measures in a finance bill due before the UK Parliament, that also would have contravened the EU divorce treaty.
The news of the British about-turn came in a joint announcement from senior UK minister Michael Gove and European Commission Vice-President Maroš Šefčovič, co-chairs of the Joint Committee that oversees the exit deal's application relating to Northern Ireland.
It would appear to be a climbdown by Boris Johnson's government, which is struggling to reach a last-ditch deal on trade and future relations with the EU before the post-Brexit transition period expires at the end of the year.
The plan to ditch parts of the divorce deal had put a huge spanner in the works of those separate trade negotiations, souring relations with the EU and with Ireland in particular.
In their statement, Gove and Šefčovič said agreement had been reached over all issues relating to the Northern Ireland Protocol, part of the binding Withdrawal Agreement that set the terms for the UK's departure from the EU last January.
The deal covers checks on items travelling from Britain to Northern Ireland including animals, food and medicines. There is agreement on determining criteria on goods deemed "not at risk" of passing on into the Irish Republic, and thus the EU. Agricultural and fish subsidies are to be exempt from State aid rules.
"In view of these mutually agreed solutions, the UK will withdraw clauses 44, 45 and 47 of the UK Internal Market Bill, and not introduce any similar provisions in the Taxation Bill," the statement says.
Under the Brexit divorce deal struck last year, Northern Ireland will remain subject to some EU rules after the end of the post-Brexit transition period, in order to keep an open land border with the Republic of Ireland.
This effectively creates a regulatory divide in the Irish Sea between Great Britain and Northern Ireland. But the UK government's internal market bill would have given powers to UK ministers to override some provisions in the treaty relating to border bureaucracy and state aid rules.
Northern Ireland trade bodies have warned that businesses don't have enough time to prepare for the new border arrangements due to kick in from January 1.
Tuesday's development should improve the atmosphere between London and Brussels as talks on a trade deal and the future relationship go down to the wire.
However, the obstacles to an accord remain the same, with significant gaps remaining over fishing rights, competition rules and a system for enforcing a deal.
British Prime Minister Boris Johnson warned on Tuesday that securing a Brexit deal is "looking very, very difficult" as he prepares to go to Brussels later this week to meet with Commission chief Ursula von der Leyen.
The UK had already hinted at withdrawing its controversial planned measures to break the divorce deal in the event of a trade agreement being struck.
That led Ireland's Foreign Minister Simon Coveney to comment on Monday: "'They're simply taking something off the table that in the EU's view should never have been on the table."
In a follow-up statement on Tuesday, Coveney said the UK's withdrawal of the controversial plan was "of particular significance". He also welcomed the news that agreement had been reached in principle on all outstanding issues over the implementation of divorce deal measures for Ireland and Northern Ireland.
"I hope this may also provide some of the positive momentum necessary to instil confidence and trust and allow progress in the wider context of the future relationship negotiations."