It remains to be seen whether the agreement, known as the Windsor Framework, will clear the way for Northern Ireland to form a government after months of paralysis in Belfast. That will depend on whether the Democratic Unionists can be coaxed back into a power-sharing arrangement with the Irish nationalist party, Sinn Fein.
Still, the generally positive reaction to the agreement, analysts said, is a tribute to Mr. Sunak’s negotiating skills. On the issues that matter to the Brexiteers, like the jurisdiction of European Union law over Northern Ireland, he extracted significant concessions from Brussels. Under the terms of the deal, the territory’s elected assembly will have a lever to reject the imposition of new E.U. laws.
Mr. Sunak was able to obtain such compromises, they said, because his counterparts in Brussels viewed him as a good-faith negotiator, who earnestly sought a deal to reset relations between London and Brussels.
That is a stark contrast to his predecessors, Liz Truss and Boris Johnson. Mr. Johnson is viewed with suspicion in many European capitals as the man who reneged on his own Northern Ireland trade deal with Brussels. As foreign secretary, Ms. Truss proposed legislation — which Mr. Sunak has now scrapped — that would unilaterally discard parts of that agreement.
“Sunak’s agreement significantly improves upon the deal Johnson did,” said Mujtaba Rahman, a former European Commission official who is now an analyst at the political risk consultancy, Eurasia Group. “He’s not instrumentalizing Northern Ireland in the way that Johnson and Truss did for their own domestic political purposes.”
Beyond the fine print in the deal, which covers issues like the customs paperwork needed to mail packages, Mr. Sunak also benefited from the passage of time. Nearly seven years after the referendum that set Brexit in motion, the country that has grown weary of ceaseless debates over it.
Bickering over trade rules in Northern Ireland seemed less relevant at a time when Britain is grappling with soaring energy prices and the gravest economic crisis in a generation. London and Brussels need to collaborate on other challenges, like the war in Ukraine and the perilous flow of migrants across the English Channel in small boats.