A court of appeal in Belfast has ruled that the Northern Ireland Protocol for post-Brexit customs controls is legal.
Judges concluded that the deal between the United Kingdom and the European Union was “simple or straightforward”.
The verdict is a blow to unionists in Northern Ireland who see the protocol as a threat to their place in the UK, as it keeps Northern Ireland in the European single market and customs union.
They had argued that the text had illegally overwritten parts of the Acts of Union 1800 and the Northern Ireland Act 1998, which established peace after three decades of bloody conflict.
But Justice Siobhan Keegan rejected both claims, ruling that the UK government had acted lawfully and that the protocol was consistent with UK and EU laws.
Lawyers for the Unionist leaders are now considering taking the case to the British Supreme Court in London.
The Belfast court decision comes amid a political crisis in Northern Ireland after First Minister Paul Givan resigned in February over the protocol dispute.
His departure further complicated Brexit negotiations between London and Brussels on the application of the Northern Ireland Protocol.
UK foreign secretary Liz Truss has reportedly set out plans to put the dispute on hold due to Russia's invasion of Ukraine.