After months of negotiations and missed deadlines, the UK and EU have at last agreed on a much anticipated post-Brexit deal to outline their future relationship after the UK officially leaves the bloc on December 31.
The deal will "protect European interests", European Commission President Ursula von der Leyen said, calling it "historic".
"We can finally leave Brexit behind us. Europe will continue to move forward," she added.
UK Prime Minister Boris Johnson said that they had completed "the biggest trade deal yet (...) a comprehensive Canada-style free trade deal between the UK and the EU" with no quotas or tariffs.
"We've taken back control of our laws and our destiny," Johnson added, stating that the jurisdiction of the European Court of Justice would come to an end and that the UK would be an "independent coastal state".
"We will be your friend, your ally, your supporter and, indeed, never let it be forgotten, your number one market," Johnson added. He said he hoped for a vote in Parliament on December 30.
British lawmakers are to be recalled on December 30 to consider the deal and Labour leader Sir Keir Starmer said in a statement shortly after the deal was announced that his party will vote for the agreement.
The opposition leader said his party faced a "binary choice" of supporting the deal or a no-deal, which he added, Labour had " never been for".
A new relationship
"The UK has chosen to leave the EU and the single market, to give up the rights and advantages of a member state," said Michel Barnier, the EU's chief negotiator, at an earlier press conference.
"There will therefore be, despite this deal, real changes in the coming days (...) that is the consequence of Brexit."
Von der Leyen said the EU had secured five and a half years of full predictability for the fishing community. Fishing rights was one of the final disagreements between the EU and UK, with Johnson saying that the EU had wanted a longer transition period for fishing.
The Commission president emphasised that the UK was now a "third country" but remained a "trusted partner". She said that she felt relieved that a deal had been found.
One of the consequences is that the UK will pull out of Erasmus which, Johnson said was a "tough decision."
"Foreign policy, external security and defence cooperation is not covered by the Agreement as the UK did not want to negotiate this matter," the Commission said in a statement.
"It's one thing to get freedom, winning freedom is a fantastic thing, but it's how we use it, how we make the most of it. That's going to matter in the months and years to come," Johnson said.
"The EU is an extraordinary concept and it was born out of the agony of WWII, founded by idealistic people in France, in Germany, in Italy who never wanted those countries to go to war with each other again."
He added that the EU's "ideology of endless integration" had been hard to get on board with and that the UK had a complicated relationship with the bloc.
"I think that what we've got here is the basis of a new longterm friendship and partnership that basically stabilises that relationship."
As part of the new deal agreed, UK citizens will no longer be able to work in the EU and will need a visa if staying for longer than 90 days.
In terms of trade, there will be zero tariffs or quotas on goods. Food exports will need valid health certificates.
There are five programmes that the UK will continue to participate in (open to third country participation): Horizon Europe (research and innovation), Euratom Research and Training programme, ITER (fusion test facility), Copernicus (Earth monitoring system) and they will have access to EU satellite surveillance & tracking (SST) services.**
Negotiations lasted overnight
European Union and British negotiators worked through the night to put the finishing touches on a post-Brexit trade deal after nine months of talks.
European Commission chief spokesperson Eric Mamer tweeted around midnight that negotiations were continuing through the night, with reports of negotiators working to deliver the text to their leaders at dawn on Thursday.
Meanwhile, Johnson briefed his cabinet on the outlines of a tentative deal in a late-night conference call.
A diplomatic source told AFP news agency that "the British side was moving but the devil is in the details and we're not quite there yet."
A spokesperson for the German EU Council presidency asked that "EU Ambassadors to be available during Christmas period."
The two sides began the week with significant differences over the issues of fishing rights, fair competition rules and the question of enforcing a new deal.
Negotiations were primarily led by the EU's Michel Barnier and Britain's David Frost.
But UK Prime Minister Boris Johnson and Ursula von der Leyen, the European Commission president, are understood to have taken direct charge of certain policy areas as the prospect of a deal drew closer.
There had been calls for the UK to seek more negotiating time by prolonging its membership of the EU Single Market.
Earlier this month, a deal looked to be unlikely with both Johnson and von der Leyen stating that large differences remained. But midway through the month, negotiators said some progress had been made on the "level playing field" and that they would "go the extra mile" in negotiations.
Reaction to news of a post-Brexit deal
"These have been very challenging negotiations but the process is not over. Now is the time for the Council and the European Parliament to analyse the agreement reached at negotiators’ level, before they give their green lights," said European Council President Charles Michel.
European Parliament President David Sassoli said that while he welcomed the deal, "the last-minute nature of the agreement does not allow for proper parliamentary scrutiny by the European Parliament before the end of the year."
German Chancellor Angela Merkel said in a statement that the German government would examine the text but had been kept up to date by the Commission.
"We will therefore be able to judge quickly whether Germany can support today's negotiation result. I am very confident that we have a good result here," Merkel said.
French President Emmanuel Macron said the deal with the UK was "essential to protect our citizens, our fishermen, our producers."
"Europe is moving forward and can look to the future, united, sovereign and strong," he added.
British trade secretary Liz Truss tweeted: "We will have a strong trading relationship with the EU and deepen our trade with partners across the world through our independent trade policy."
Charles Grant, the director of the Centre for European Reform, said the deal was "thin" and that negotiations would likely be ongoing.
"When the Brits realise what a thin deal they've got, their politicians will debate how/whether to improve it. Labour is likely to seek closer economic & security ties. For one reason or another, UK & EU will be in permanent negotiation, for at least 50 years. Ask the Swiss," Grant tweeted.
Fishing rights was one of the key disagreements
The EU was aiming to retain access to British waters for fishermen. EU boats have, until now, caught fish in UK waters worth €650 million annually.
But the UK has been determined to regain "control" of its own waters as an "independent coastal state". An important factor though is that the UK sells the majority of the fish it catches to the European market.
On the amount of fish previously caught by the EU, the two sides disagree on the percentage to be returned to the UK. The EU's starting position was to give up only up to 18% of its catch, but the UK said the figure should be nearer 80%.
Preliminary reports suggested that the UK had accepted a 25% repatriation of quotas, but that the British negotiating team had managed to throw out attempts by the bloc to put in place a system where future changes to the quotas could lead to tariffs on exports from the UK.
New arrangements provide for a transition period of 5.5 years during which reciprocal access to fish in each other’s waters remain unchanged, with gradual transfer of EU quotas to the UK.
Now that a deal is agreed upon, it will need to be ratified by Britain's parliament, the European Parliament and by all 27 EU member states.
That process will run well into the New Year, although the UK is understood to be preparing to recall MPs from their Christmas break to approve the trade deal.
Governments have said that they will now be looking through the details of the 500 pages of text to decide on the deal.