EXPLAINED: What is in the new Brexit deal and how does it solve the Northern Irish border and backstop issues?
Boris Johnson is hailing a breakthrough in the Brexit talks with a new deal agreed by the UK and the EU teams.
Progress had stalled ahead of the European Council summit after the DUP rejected the Prime Minister’s most recent offer to resolve the Northern Irish border problem and replace the controversial backstop.
So what is in the new agreement, and how does it aim to resolve the key issues?
The EU’s chief negotiator Michel Barnier said the new solution rests on four main elements: Firstly, that Northern Ireland will remain aligned to a limited set of EU rules, meaning goods coming from Britain will be checked on entry to the island, rather than on the border between Northern Ireland and Ireland.
Secondly, that Northern Ireland will remain in the UK's customs territory when it comes to all future trade deals, and will be the external border to the EU’s single market.
Thirdly are improved rules around VAT, and fourthly a Stormont lock which allows the Northern Ireland Assembly to vote on whether or not to keep the arrangements in place.
It means if it votes in favour to keep it by a simple majority then the arrangement would continue for another four years.
If there is a cross-community vote in favour - meaning it is supported by both the unionist and nationalist communities - then it would continue for eight years.
But if the Assembly votes to end the arrangements then there would be a two-year cooling-off period before they finish.
Barnier said "Throughout these negotiations the EU and UK were fully committed to protect peace and stability on the island of Ireland.
"Discussions over the past days have at times been difficult, but have delivered and we have delivered together."
Essentially it boils down to revised agreements on the two Cs: customs and consent.
What this deal appears to do is completely remove the backstop in favour of giving Northern Ireland a say on a time-limited arrangement.
And that Northern Ireland is now in a hybrid customs territory, but crucially with no checks at the border with Ireland.
A statement from the European Commission said: “The revised protocol provides a legally operational solution that avoids a hard border on the island of Ireland, protects the all-island economy and the Good Friday Agreement in all its dimensions and safeguards the integrity of the Single Market.
“This solution responds to the unique circumstances on the island of Ireland with the aim of protecting peace and stability.”
The statement added: “In terms of customs, the EU-UK Single Customs Territory, as agreed in November 2018, has been removed from the Protocol on Ireland/Northern Ireland, at the request of the current UK government.
“EU and UK negotiators have now found a new way to achieve the goal of avoiding a customs border on the island of Ireland, while at the same time ensuring Northern Ireland remains part of the UK's customs territory.
“Finally, the EU and the UK have agreed to create a new mechanism on ‘consent', which will give the Members of the Northern Ireland Assembly a decisive voice on the long-term application of relevant EU law in Northern Ireland.”