British Prime Minister Boris Johnson tweeted a picture of himself inside Downing Street, raising both arms in a thumbs-up gesture of triumph, with the words 'The deal is done'.
Britain clinched a narrow Brexit trade deal with the European Union (EU) on December 24, just seven days before it exits one of the world's biggest trading blocs in its most significant global shift since the loss of empire.
The deal means it has swerved away from a chaotic finale to a tortuous divorce that has shaken the 70-year project to forge European unity from the ruins of World War Two.
European Commission President Ursula von der Leyen told reporters: "It was a long and winding road. But we have got a good deal to show for it. It is fair, it is a balanced deal, and it is the right and responsible thing to do for both sides."
British Prime Minister Boris Johnson tweeted a picture of himself inside Downing Street, raising both arms in a thumbs-up gesture of triumph, with the words "The deal is done".
"We have taken back control of our money, borders, laws, trade, and our fishing waters," a Downing Street source said.
"We have delivered this great deal for the entire UK in record time, and under extremely challenging conditions... all of our key red lines about returning sovereignty have been achieved."
While the last-minute deal prevents the most acrimonious ending to the saga on January 1, the UK is set for a much more distant relationship with its biggest trade partner than almost anyone expected at the time of the 2016 referendum.
A deal had seemed imminent for almost a day, until haggling over just how much fish EU boats should be able to catch in British waters delayed the announcement of one of the most important trade deals in recent European history.
The UK formally left the EU on January 31, but has since been in a transition period under which rules on trade, travel, and business remained unchanged until the end of this year.
The details of the accord have yet to be made public, but if the sides have struck a zero-tariff and zero-quota deal, it will help to smooth trade in goods that makes up half their $900 billion in annual commerce.
It will also support the peace in Northern Ireland - a priority for US President-elect Joe Biden, who had warned Johnson that he must uphold the 1998 Good Friday peace agreement.
Even with an accord, some disruption is certain from January 1 when Britain ends its often fraught 48-year relationship with a Franco-German-led project that sought to bind the ruined nations of post-World War Two Europe together into a global power.
Tony Danker, director-general of the Confederation of British Industry, gave the deal a grudging welcome: "Coming so late in the day, it is vital that both sides take instant steps to keep trade moving and services flowing."
After months of talks that were at times undermined by both COVID-19 and rhetoric from London and Paris, leaders across the EU's 27 member states have cast an agreement as a way to avoid the nightmare of a "no-deal" exit.
But Europe's second-largest economy will still be quitting both the EU's single market of 450 million consumers, which late British Prime Minister Margaret Thatcher helped to create, and its customs union.
Sterling extended gains and rose as high as $1.3620. It was last up 0.7 percent at $1.3591, with potential to rise to a 2-1/2-year high above $1.3625.