Britain and the European Union were on the cusp of striking a narrow trade deal on Thursday, swerving away from a chaotic finale to the Brexit split that has dealt a blow to the 70-year attempt to forge European unity from the ruins of World War Two.
While a last-minute deal would avoid the most acrimonious ending to the Brexit divorce, the United Kingdom is heading for a much more distant relationship with its biggest trade partner than almost anyone expected at the time of the 2016 Brexit vote.
Sources in London and Brussels said a deal was close as British Prime Minister Boris Johnson held a late-night conference call with his Cabinet of senior ministers, and negotiators in Brussels pored over reams of legal trade texts.
"Work will continue throughout the night," said European Commission President Ursula von der Leyen's spokesman, Eric Mamer.
"Grabbing some sleep is recommended to all Brexit-watchers at this point. It will hopefully be an early start tomorrow morning," Mamer said.
There was no official confirmation of a deal but a news conference was expected in London on Thursday morning - just seven days before the UK turns its back on the EU's single market and customs union at 2300 GMT on Dec. 31.
The United Kingdom formally left the EU on Jan. 31 but has since been in a transition period under which rules on trade, travel and business remained unchanged. But from the end of this year, it will be treated by Brussels as a third country.
If they have struck a zero-tariff and zero-quota deal, it would safeguard nearly $1 trillion in annual trade, and support the peace in Northern Ireland - a priority for U.S. 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 Jan. 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 as a global power.
After months of talks that were at times derailed by both COVID-19 and Brexit fireworks 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 exit both the EU's Single Market, which former British Prime Minister Margaret Thatcher helped create, and its Customs Union.
When the UK shocked the world by voting to leave the EU, many in Europe hoped that it could stay closely aligned. But that was not to be.
Johnson, the face of the 2016 Brexit campaign, made clear that since 52% had voted to "take back control" from the EU, he was not interested in accepting the rules of either the Single Market or the Customs Union.
The EU did not want to allow a freewheeling, deregulated British economy that might encourage others to leave.
The result was a tortuous negotiation on a level playing field in competition - which the EU demanded for access to its market. At one point, EU chief negotiator Michel Barnier even posted a picture of himself in London staring at a playing field.
If there is to be a deal, it covers goods but not the financial services that make London the only financial capital to rival New York. Services make up 80% of the British economy.
Goods trade will have more rules, more red tape and more cost. There will be some disruption at ports. Everything from food safety regulation and exporting rules to product certification will change.
In essence, what they have agreed is a narrow free trade deal surrounded by other agreements on fisheries, law enforcement cooperation, transport and energy.
The UK, which imports about $107 billion more a year from the EU than it exports there, bickered until the end over fish - important for Britain's small fishing fleet but worth less than 0.1% of GDP.
EU market admittance for London-based banks, insurers and asset managers is being handled outside the deal and from Jan. 1, access will be patchy at best.
(Reporting by Gabriela Baczynska, Guy Faulconbridge and Elizabeth Piper; Additional reporting by Kate Holton, John Chalmers, William Schomberg and Michael Holden; Writing by Guy Faulconbridge; Editing by Peter Cooney)