Britain and the European Union on Thursday reached an agreement on their post-Brexit relationship after both sides gave ground on some of the thorniest issues.
Fishing rights and competition rules were the key issues that negotiators butted heads over right up until the very last minute
Here's how they compromised and what will change.
London and Brussels agreed to a five-and-a-half-year transition period on fisheries.
British Prime Minister Boris Johnson stressed in a press conference: "We will be an independent coastal state with full control of our waters, with the UK's share of fish in our waters rising substantially from roughly half today to closer to two thirds in five and a half years."
He said the UK had initially offered three years but that the Commission wanted the transition period to last 14 years and described the compromise as "reasonable".
The deal establishes a "new framework for law enforcement and judicial cooperation in criminal and civil law matters," the Commission said in a statement.
The UK agreed to stay in the European Convention of Human Rights so that standards on both sides of the Channel on the issue remain the same, which it initially didn't want to do.
That means the EU can suspend security cooperation if it believes the UK is violating the Convention.
The UK will lose access to the Schengen Information System — the largest information sharing system for security and border management in Europe — but both sides will continue to share Passenger Name Record — the information provided by airlines — and Prum — a cross border database of DNA and fingerprints.
The EU also stressed that the deal on extradition is "unprecedented".
Dispute resolution mechanism
The UK was adamant it would no longer be under the jurisdiction of the European Court of Justice but the EU wanted to keep this in place to ensure it could ask for sanctions against Britain if it felt London was undercutting European consumers and businesses.
The UK appears to have got its way when it comes to the ECJ, with the deal planning for "binding enforcement and dispute settlement mechanisms".
"This means that businesses in the EU and the UK can compete on a level playing field and will avoid either party using its regulatory autonomy to grant unfair subsidies or distort competition," the Commission said in a statement.
"Both parties can engage in cross*sector retaliation in case of violations of the agreement."
What has been agreed on other issues?
Visas will now be required for stays over 90 days, which means Britons can no longer freely move to the EU to live, work or study and vice versa.
There will be "zero tariffs and zero quotas on all goods that comply with the appropriate rules of origin", so in that respect, not much changes.
But this doesn't apply to services. The UK's summary of the deal states that "the Agreement significantly builds on the Parties' commitments under WTO (World Trade Organisation) rules and locks in market access across substantially all sectors."
Britain withdrew from the Erasmus student exchange programme. Johnson said this had been "a tough decision" and announced the launch of a new scheme, named after mathematician and wartime code-breaker Alan Turing.
"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 its statement.
"As of 1 January 2021, there will therefore be no framework in place between the UK and the EU to develop and coordinate joint responses to foreign policy challenges, for instance, the imposition of sanctions on third-country nationals or economies," it added.
The Commission has released an infographic detailing what else will change come December 31.
Roaming charges, easy recognition of professional qualifications, the financial services passport and access to the Galileo encrypted military signal are among the things not covered by the deal.