After hundreds of hours of negotiating, moments at which insiders concede it looked as if it might all unravel, a new deal looks set to be agreed today.
If all goes to plan, Rishi Sunak and EU Commission President Ursula von der Leyen will meet at a smart hotel in Berkshire to seal what they have agreed on post-Brexit trade in Northern Ireland.
Politics news – latest: Final talks on post-Brexit deal as PM prepares to meet EU chief
This is the Brexit hangover. A Northern Ireland Protocol, alongside the main trade agreement, was agreed by Boris Johnson at the end of 2020.
But despite his claims that exporters would face no checks, it effectively put a trade border in the Irish Sea and meant businesses exporting goods from Great Britain to Northern Ireland have had additional hoops to jump through.
The practical problems, and perhaps more importantly, the political issues arising from it – in terms of Northern Ireland being treated differently from the rest of the UK – have infuriated unionists and led to the collapse of power-sharing.
Within months of it being agreed, Conservative politicians were also denouncing the Protocol – or as they saw it, the EU’s implementation of it – and calling for it to be fixed.
UK and EU agree new deal on Northern Ireland post-Brexit trade rules – senior government source
EU boss Ursula von der Leyen to meet King while in UK for Brexit talks
Brexit: New Northern Ireland Protocol deal ‘will have unanswered questions’ says former minister – as Starmer says Labour will likely back it
Whether today’s fix can solve these issues and command widespread support is the key question.
The choreography is all in place – Mr Sunak will meet Ms Von der Leyen, and they will speak for up to an hour to sign off the final details. Then, after a call to brief the cabinet, the two leaders will hold a joint press conference.
The full details have been a closely guarded secret, but allies of the prime minister say he has secured concessions that eluded his predecessors.
There is expected to be an agreement that goods bound for Northern Ireland won’t face additional checks – they will go through effectively a “green lane”, as opposed to the “red lane” for goods going on to the Republic of Ireland, which is an EU member.
There is also expected to be some movement on allowing VAT and state aid rules in Northern Ireland to be set in Westminster, and a scaled back role for the European Court of Justice in settling trade disputes.
Please use Chrome browser for a more accessible video player
Officials have discussed the details for the best part of 18 months.
What’s changed is the political environment, with trust built up between Mr Sunak and the EU that they can both accept the compromises needed.
What the prime minister cannot control is the reaction of Conservative MPs, notably Mr Johnson, who has called for the government to continue with a bill to override parts of the Brexit agreements unilaterally.
He may prove a rallying point for discontent.
Another senior Brexiteer who is reserving judgement told me legal changes will be essential to unlocking his party’s support for the deal as “otherwise we are relying on the EU’s word and they have a bad track record”.
Read more
Has Rishi Sunak got the politics right on the post-Brexit deal?
Here’s how ‘final talks’ between UK and EU could unfold
But many Brexiteers sound more open to being convinced than they have been in previous weeks, with allies of the prime minister telling them a breakthrough on this will help with sorting out pressing issues such as small boats, on which there is a meeting with French President Emmanuel Macron next month.
Crucial too will be the reaction of the Democratic Unionist Party, which may well take time to pass judgement on the deal and whether it meets the seven tests it has set out.
Mr Sunak has spoken of his focus on restoring power-sharing in the Stormont Assembly, but today sources said he could not force Northern Ireland parties back around the table.
This will be the first time he has challenged his party, having become leader after the demise of Liz Truss and still blamed by some party members and colleagues for the fall of Mr Johnson.
If his deal eases trade in Northern Ireland, he can limit Tory opposition, and if it leads to the restoration of government in Northern Ireland, he will be strengthened.
But there are a lot of moving parts, and this looks to be the biggest gamble of his premiership.