Michel Barnier and David Frost brexit negotiations
David Frost, UK Brexit negotiator and Michel Bernier, negotiator for the EU
A deal was stuck by chief negotiators David Frost and Michel Barnier in Brussels

UK and EU negotiators have finally agreed a Brexit trade and security deal, just eight days before Britain leaves the bloc's single market and customs union on 31 December.

The eleventh-hour agreement, which only emerged after a litany of missed deadlines, averts a no-deal outcome that would have seen Britain trading on WTO terms with tariffs and quotas applied to its imports and exports.

It represents the largest trade deal ever signed by either side, retaining existing zero-tariff zero-quota arrangements on imports and exports totalling around ยฃ668bn a year.

The most contentious part of the negotiation ended with an agreement to phase in new quota arrangements for fisheries in UK waters over five and a half years.

A UK source said: "Deal is done. Everything that the British public was promised during the 2016 referendum and in the general election last year is delivered by this deal.

"We have taken back control of our money, borders, laws, trade and our fishing waters.

"The deal is fantastic news for families and businesses in every part of the UK. We have signed the first free trade agreement based on zero tariffs and zero quotas that has ever been achieved with the EU."

In Brussels, European Commission president Ursula von der Leyen said: "We have finally found an agreement. 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."

Speaking moments later in 10 Downing Street, Boris Johnson said the UK had "won its freedom".

He said: "We have taken back control of our laws and our destiny. We have taken back control of every jot and tittle of our regulation in a way which is complete and unfettered...

"We have today resolved the question that has bedevilled our politics for decades and it is up to us all together as a newly and truly independent nation to realise the immensity of this moment and to make the most of it."

UK sources said that the deal would "guarantee were are no longer in the lunar pull of the EU", as Britain will no longer be bound by EU rules and there is no role for the European Court of Justice.

"All of our key red lines about returning sovereignty have been achieved," said the source. "It means we will have full political and economic independence on 1 January 2021."

The source said that the deal was delivered "in record time and under extremely challenging conditions" and would end free movement and allow the introduction of a points-based immigration system.

The deal does not preserve the seamless trade with the bloc the UK currently enjoys in the single market, and will see new border checks applied to UK and EU goods. It is the first trade deal in history to erect rather than remove barriers to commerce between the two sides.

Extra red tape and bureaucracy caused by Brexit will see traders fill in an estimated 200 million customs declarations a year, while official estimates say it will cost the UK 4 per cent of GDP in the long term compared our remaining in the EU.

But failing to reach the agreement would have dramatically worsened the logistical chaos currently playing out at English channel ports due to French border closures.

The 2,000-page legal text is understood to resolve bitter disputes on issues including access for EU ships to British fishing waters and Brussels' demand for a "level playing-field" on standards and state aid.

Brinksmanship on both sides took the negotiation process to the wire, with the UK accusing Brussels of introducing new demands in the final weeks.

Even after the detail of the vast bulk of the agreement was finalised, officials haggled through the night and much of Christmas Eve on the precise proportions of individual species of fish to be caught by either side in UK waters.

The deal thrashed out by chief negotiators David Frost and Michel Barnier was concluded some 1,645 days after the UK's referendum vote to leave the EU, and almost 11 months after the formal date of Brexit on 31 January.

The final, most difficult issue of fishing rights required direct talks between Boris Johnson and EU Commission president Ursula von der Leyen, who are understood to have spoken at length over the telephone in the final days and as many as five times in the final 24 hours.

If ratified by EU leaders it paves the way for a treaty governing trade between the former partners on the basis of zero tariffs and zero quotas, as well as future co-operation in areas such as security and law and order.

Ms von der Leyen said the UK will now be treated as a "third country" by the EU, but added: "It remains a trusted partner... The EU and UK will stand shoulder to shoulder to deliver on our common global goals."

The Commission president said she greeted the achievement of the deal not with "joy" but with "quiet satisfaction and, frankly speaking, relief".

"I know this is a difficult day for some and to our friends in the UK, I want to say 'Parting is such sweet sorrow'.

"Let me use a line from TS Eliot: 'What we call the beginning is often the end, and to make an end is to make a beginning'.

"To all Europeans, I say, it is time to leave Brexit behind. Our future is made in Europe."

The document requires approval from the leaders of the 27 EU nations, while the European Parliament is expected to vote on it next year, after the deadline for MEPs to scrutinise it in 2020 was missed by a week.

EU leaders are expected to give provisional approval for the deal so that it can come into effect this year. If they were to refuse to do so, a short period of no-deal could still happen in early January anyway.

MPs and peers are expected to be recalled to Westminster on 30 December to rush the agreement into law in a single day.

But hardline Brexiteers on the backbench Tory European Research Group have signalled that they are not prepared to act as a rubber-stamp, reconvening their so-called Star Chamber of legal experts under the chairmanship of veteran eurosceptic Sir Bill Cash to scour through the document for signs that it does not protect the UK's sovereignty.

Sir Keir Starmer has yet to say whether his party will back the deal, though Mr Johnson has little reason to fear parliamentary defeat next week, as few Labour MPs will vote against an agreement when the alternative is a no-deal crash-out.

The Labour leader is to meet with his shadow cabinet later today before holding a press conference.

A Labour spokesman said: "Since the election, the Labour Party has urged the Government and the EU to secure a trade deal because that is in the national interest. We will be setting out our formal response to the deal in due course."

Trading on WTO terms would have meant tariffs of 10 per cent on cars and an average 18 per cent on foodstuffs imported from the EU.