Britain and the European Union struck a post-Brexit trade deal Thursday that they hope will cushion the economic blow of the UK's imminent departure from the bloc after months of tortuous negotiations.
"The deal is done," British Prime Minister Boris Johnson tweeted, declaring that the UK would remain Europe's ally and "number one market".
"We have finally found an agreement," the president of the European Commission Ursula von der Leyen said.
"It was a long and winding road, but we have a good deal at the end of it," she said. "The single market will be fair and remain so."
Britain formally left the EU in January after a deeply divisive referendum in 2016, the first country to split from the political and economic project that was born as the continent rebuilt in the aftermath of World War II.
But London remains tied to the EU's rules during a transition period that runs until midnight on December 31, when the UK will leave the bloc's single market and customs union.
The final 2,000-page agreement was held up by last-minute wrangling over fishing as both sides haggled over the access EU fishermen will get to Britain's waters after the end of the year.
Von der Leyen thanked the British negotiators and said that although the UK would become a "third country" it would be a trusted partner.
"This agreement is in the United Kingdom's interest, it will set solid foundations for a new start with a long term friend," she said.
"And it means that we can finally put Brexit behind us and Europe is continuing to move forward," she said.
Irish premier Micheal Martin -- whose EU member state would have been hard hit by a no-deal -- said the accord was "very welcome".
"While we will miss the UK from the European Union, the fact that a deal is now in place means we can focus on how we manage good relationship in the years ahead," he said on Twitter.
German Chancellor Angela Merkel said she was "confident" that the deal was a "good outcome" as it now goes over to EU member states to agree.
- EU states to ratify -
Following the announcement of the political accord, von der Leyen's Commission will send the text to the European capitals.
They are expected to take two or three days to analyse the agreement and decide whether to approve its provisional implementation.
The UK parliament will also have to interrupt its end of year holidays to vote on the deal before the December 31 cut-off.
Once it is signed off and the text published in the EU's official journal it will go into effect on January 1 when Britain has left the bloc's single market.
The European Parliament will then have a chance to retrospectively approve the deal at some point in 2021, speaker David Sassoli said.
Assuming the process goes as planned, the negotiating teams will have agreed the mammoth deal in record time.
And the 11th hour accord heads off the threat that Britain could crash out of the club after 47 years of shared history with no follow-on rules.
With Britain outside the EU single market and customs area, cross-Channel traders will still face a battery of new regulations and delays.
Economists expect both economies, already weakened by the coronavirus epidemic, to take a hit as supply chains are disrupted and costs mount.
But the threat of a return to tariffs will have been removed, and relations between the former partners will rest on a surer footing.
It is also a success for von der Leyen and her chief negotiator Michel Barnier, who led almost ten months of intense talks with Britain's David Frost.
After the 2016 referendum, in which British voters chose to leave the union, Brexiteers boasted that they could win the "easiest trade deal in history".
The argument was that, after conducting business according to EU standards and regulations for so long, the economies would be a good fit for each other.
But European capitals were concerned that if such a large rival on their doorstep were to deregulate its industry their firms would face unfair competition.
Brussels insisted the only way to keep the land border between Ireland and the UK open was to keep Northern Ireland, a British province, within its customs union.
And members balked at giving up access to Britain's rich fishing waters, which support fleets in France, Belgium, Denmark, Ireland and the Netherlands.
It was the question of fish that emerged as the last stumbling block as late as this week, when member states -- led by France -- rejected a UK offer.
London pushed to reduce EU fishing fleets' share of the estimated 650-million-euro annual haul by more than a third, with changes phased in over three years.
The EU, in particular countries with northern fishing fleets like France, Denmark and the Netherlands -- was insisting on 25 percent over at least six years.
It is not yet clear what the numbers are in the final deal, but European diplomats stressed that they would not have signed off on it unless the UK gave ground.
But Barnier insisted after the deal was struck that the EU "will support its fishermen and women. It will accompany them".