Rishi Sunak has unveiled a new deal with the EU aimed at undoing some of Boris Johnson's catastrophic Brexit failures.
After years of ugly Tory mudslinging, he and European Commission President Ursula von der Leyen finally announced an agreement - the so-called Windsor Framework - had been reached.
But it has been greeted with caution - with the DUP saying "issues of concern" remain - and Keir Starmer said the PM will need to show if he has "the strength to sell it to his backbenchers or not".
Mr Sunak hopes the new deal can finally end chaos in Northern Ireland and undo some of the onerous trading restrictions which have blighted businesses since Mr Johnson's botched agreement in 2020.
It sets up an intriguing head-to-head between the two leaders after Mr Johnson warned his successor that scrapping the legislation would be a "great mistake".
The Prime Minister described today's agreement as a "decisive breakthrough" and the beginning of a "new chapter" between the UK and EU.
Standing alongside Ms Von der Leyen, Mr Sunak told a press conference.: "Today's agreement delivers smooth-flowing trade within the whole United Kingdom, protects Northern Ireland's place in our union and safeguards sovereignty for the people of Northern Ireland."
The province has been left without a functioning devolved government after a DUP walkout left the Stormont legislative assembly unable to conduct any business.
Here we look at what we know about the deal.
Removing 'any sense' of a border on the Irish Sea
Mr Sunak said the Windsor Framework "removes any sense of a border in the Irish Sea".
One of the key changes brought in is that new 'green' and 'red' lanes are being created for goods from Britain to Northern Ireland.
No10 says this means businesses in Northern Ireland will be "freed of unnecessary paperwork, checks and duties"
One of the big sticking points of Mr Johnson's botched deal was that it effectively created a hard border on the Irish Sea, as it meant customs checks were carried out all on goods between the two countries.
This was the cause of huge frustration and impacted on the flow of food, with businesses hampered by "red tape or unnecessary checks".
Under the new system, items moving from Britain that are set to remain in Northern Ireland will travel via 'green' lanes - meaning they do not have to be checked in the same way.
The green lane will include food retailers such as supermarkets, as well as hospitality businesses.
Items that are set for the Republic of Ireland will travel via 'red' lanes. This means they will have to undergo the same level of checks that goods travelling between the UK and the EU are put through.
The government also announced that all requirements have been scrapped for trade from Northern Ireland to Great Britain on a permanent basis, including the requirement for export declarations.
The 'Stormont Brake'
Another big breakthrough in the latest round of negotiations is the so-called 'Stormont Brake'.
Mr Sunak said it would provide a way for the elected assembly in Stormont to "pull an emergency brake" on changes to EU laws.
It will give Stormont to vote down changes to EU goods laws, and the UK government will have the power to veto them, the PM claimed.
No10 said: "The Agreement rewrites the Treaty text with a new Stormont Brake that means the UK can veto new EU goods laws if they are not supported by both communities in Northern Ireland, which goes far beyond previous agreements or discussions on the old Protocol."
Ms von der Leyen described the Stormont Brake as something that would be an emergency mechanism that would hopefully not be needed.
VAT and excise changes
Another win for Mr Sunak which his predecessors were unable to achieve.
Key changes to the controversial Protocol deal will ensure the Westminster government can now make VAT and excise changes for the whole of the UK.
Under current arrangements, EU VAT and excise rules for goods generally apply in Northern Ireland.
Mr Sunak said one positive impact of this will be that reforms to cut the price of a pint of beer will now apply in Northern Ireland.
He also said it would widen the availability of items such as trees, plants and seed potatoes, while requirements on pet travel will be removed.
In a statement Downing Street said: "The legal text of the Treaty has been amended, so that critical VAT and excise changes will apply to the whole of the UK. This means that zero-rates of VAT on energy saving materials like solar panels and alcohol duty reforms will now apply in Northern Ireland.
Impact on medicine in Northern Ireland
Drugs approved by the UK's medicines regulator will be available in pharmacies in Northern Ireland.
A statement from No10 said: "The same medicines, in the same packs, with the same labels, will be available across the UK, without the need for barcode scanning requirements under the old Protocol.
"The UK will license all medicines for all UK citizens, including novel medicines like cancer drugs, rather than the European Medicines Agency under the old Protocol."
Retention of EU laws
This is where Mr Sunak could find himself at loggerheads with hardcore Brexiteers and the DUP.
Because Northern Ireland has "privileged, unrestricted access" to the EU Single Market, not all EU laws will be scrapped.
A lot of detail on this is still to come. A statement sent out by Downing Street said: "The minimal set of EU rules – less than 3% – apply to preserve the privileged, unrestricted access for Northern Ireland businesses to the whole of the EU Single Market and avoid a hard border on the island of Ireland."
Mr Sunak later told the Commons: "There will be some need for EU law." But he said this would be the "minimum amount needed".
How decisive this proves to be remains to be seen.
In a brief statement DUP leader Sir Jeffrey Donaldson said "there remain key issues of concern", adding: "There can be no disguising the fact that in some sectors of our economy EU law remains applicable in Northern Ireland."
This could be a problem for Mr Sunak as he tries to convince members of the European Research Group (ERG) within his own party.
Yesterday its chairman Mark Francois has said "less of a role" for the European Court of Justice is not "good enough" as he insisted "we are not stupid".
He said: "What we want is a situation where EU law is expunged from Northern Ireland, so it is treated on the same basis as England, Scotland and Wales."
So far the ERG is yet to respond to the announcement of the deal.
Will there be a vote in Parliament?
Yes. The government has been a bit wishy-washy in recent days.
But today Mr Sunak clarified that MPs would have the opportunity to vote on what was agreed in Windsor.
He said Parliament will have a vote on the deal "at the appropriate time", adding: "I think it's important we give everyone the time and the space they need to consider the detail of the framework."
While Mr Sunak may be faced with a rebellion by some members of his party, Labour has announced its intention to "act in the national interest" and support the government.
Keir Starmer stressed Labour's support for any deal but said the real test will be whether Mr Sunak "has got the strength to sell it to his backbenchers or not".
After a speech in the City of London, Sir Keir said it is "almost inevitable" that the European Court of Justice (ECJ) will "have to play some part" after the deal, a contentious point for the DUP.
But he said "we've got to make progress" on Northern Ireland before making "real changes" to the wider Brexit deal.
Northern Ireland Protocol Bill will be dropped
Today's announcement spells the end for ex-PM Mr Johnson's controversial Northern Ireland Protocol Bill.
In legal documents accompanying the detail about the deal, the government confirmed its intention to scrap the bill.
It said that there is no longer a "legal justification" for enacting it.
The DUP reaction
The DUP has hailed "significant progress", but party leader Sir Jeffrey Donaldson said "there remain key issues of concern".
In a statement he said: "We welcome the publication of the outcome of the Government's negotiations with the EU which ends a period of speculation and spin, often from those who know little about Northern Ireland.
"In broad terms it is clear that significant progress has been secured across a number of areas whilst also recognising there remain key issues of concern.
"There can be no disguising the fact that in some sectors of our economy EU law remains applicable in Northern Ireland."
Sir Jeffrey said that his party will now "study the detail" of the Windsor Framework, "as well as examining the detail of any and all underpinning legal texts".