Just a week before the deadline, Britain and the European Union struck a free-trade deal Thursday (US time) that should avert economic chaos on New Year's and bring a measure of certainty for businesses after years of Brexit turmoil.
Once ratified by both sides, the agreement will ensure Britain and the 27-nation bloc can continue to trade in goods without tariffs or quotas after the UK breaks fully free of the EU on January 1.
Relief was palpable on both sides that nine months of tense and often testy negotiations had finally produced a positive result.
The Christmas breakthrough was doubly welcome amid a coronavirus pandemic that has left some 70,000 people in Britain dead and led the country's neighbours to shut its borders to the UK over a new and seemingly more contagious variant of the virus spreading in England.
"We have taken back control of our laws and our destiny," declared British Prime Minister Boris Johnson, who posted a picture of himself on social media, beaming with thumbs up.
European Commission president Ursula von der Leyen said "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," she said in Brussels.
The 27 EU member states and the British and European parliaments both vote on the agreement, though action by the latter may not happen until after the January 1 breakup. Britain's Parliament is set to vote December 30.
France, long seen as Britain's toughest obstacle to a deal, said the uncanny steadfastness among the 27 nations with widely varying interests was a triumph in itself.
"European unity and firmness paid off," French President Emmanuel Macron said.
And German Chancellor Angela Merkel said that unity will now probably result in all the EU nations backing the deal: "I am very optimistic, that we can present a good result here."
It has been 4 1/2 years since Britons voted 52 per cent to 48 per cent to leave the EU and — in the words of the Brexiteers' campaign slogan — "take back control" of the UK's borders and laws.
It took more than three years of wrangling before Britain left the bloc's political structures last January. Disentangling the two sides' economies and reconciling Britain's desire for independence with the EU's aim of preserving its unity took months longer.
The devil will be in the detail of the 2000-page agreement, but both sides claimed the deal protects their cherished goals. Britain said it gives the UK control over its money, borders, laws and fishing waters and ensures the country is "no longer in the lunar pull of the EU".
Von der Leyen said it protects the EU's single market and contains safeguards to ensure Britain does not unfairly undercut the bloc's standards.
Johnson's relief at striking a deal contrasted with his earlier insistence that the U.K. would "prosper mightily" even if no agreement were reached and the U.K. and the EU had to reinstate tariffs on each other's goods.
His government acknowledged that a chaotic no-deal exit — or a "crash-out," as the British call it — would probably bring gridlock at the country's ports, temporary shortages of some goods and price increases for staple foods. The turmoil could cost hundreds of thousands of jobs.
To avoid that, negotiating sessions alternating between London and Brussels — and sometimes disrupted by the pandemic —- gradually whittled differences between the two sides down to three key issues: fair-competition rules, mechanisms for resolving future disputes, and fishing rights.
The EU has long feared that Britain would slash social, environmental and state aid rules after Brexit and gain a competitive advantage over the EU. Britain denies planning to institute weaker standards but said that having to follow EU regulations would undermine its sovereignty.
A compromise was eventually reached on the tricky "level playing field" issues. That left the economically minor but hugely symbolic issue of fishing rights as the final sticking point, with maritime EU nations seeking to retain access to U.K. waters where they have long fished and Britain insisting it must exercise control as an "independent coastal state".
Under the deal, the EU is giving up a quarter of the quota it catches in UK. waters, far less than the 80 per cent Britain initially demanded. The system will be in place for 5 1/2 years, after which the quotas will be reassessed.
The UK has remained part of the EU's single market and customs union during the 11-month post-Brexit transition period. As a result, many people so far have noticed little impact from Brexit.
On January 1, the breakup will start feeling real. Even with a trade deal, goods and people will no longer be able to move freely between the UK and its continental neighbours without border restrictions.
EU citizens will no longer be able to live and work in Britain without visas -- though that does not apply to the 4 million already doing so -- and Britons can no longer automatically work or retire in EU nations. Exporters and importers face customs declarations, goods checks and other obstacles.
The UK-EU border is already reeling from new restrictions placed on travellers from Britain into France and other European countries because of the new version of the coronavirus sweeping through London and southern England.
Thousands of trucks were stuck in traffic jams near the port of Dover on Wednesday, waiting for their drivers to get virus tests so they could enter the Eurotunnel to France.
British supermarkets said the backlog will take days to clear and there could be shortages of some fresh produce over the holiday season.
Despite the deal, there are still unanswered questions about huge areas, including security cooperation between the UK and the bloc — with the UK set to lose access to real-time information in some EU law-enforcement databases — and access to the EU market for Britain's huge financial services sector.
Von der Leyen said she felt "quiet satisfaction," but no joy, now that the torrid Brexit saga that has consumed Britain and the EU for years is finally almost over.
"I know this is a difficult day for some, and to our friends in the United Kingdom I want to say parting is such sweet sorrow."
Johnson said Britain will always be a strong friend and partner to the EU.
"Although we have left the EU, this country will remain, culturally, emotionally, historically, strategically, geologically attached to Europe."