A post-Brexit trade deal has been agreed by negotiators from the UK and the European Union after months of talks and frantic last-minute wrangling.

The deal was secured on Christmas Eve, a week before current trading arrangements expire.

A UK source said the deal delivered “everything that the British public was promised during the 2016 referendum”.

Prime Minister Boris Johnson and European Commission president Ursula von der Leyen were in close contact over recent days to help get the deal over the line.

But negotiations led by the EU’s Michel Barnier and the UK’s Lord Frost continued throughout the day as final details were hammered out.

READ MORE: Brexit: UK and EU reach agreement on trade deal

Scotland First Minister Nicola Sturgeon tweeted:

“Before the spin starts, it’s worth remembering that Brexit is happening against Scotland’s will. And there is no deal that will ever make up for what Brexit takes away from us. It’s time to chart our own future as an independent, European nation.”

Scottish Conservative Leader Douglas Ross said: “This deal has been secured as a result of the hard work and commitment of the UK and European negotiating teams.

“Both sides recognised the importance of reaching agreement on a range of complex issues and avoiding a damaging no deal outcome. To have done so just in time for Christmas is great news.

“Crucially, this will protect Scottish jobs and our fishing communities will be far better off without the hated Common Fisheries Policy.

“It is vital that we now move on from past divisions and focus entirely on working together to fight coronavirus and rebuild Scotland’s economy.”

“The UK’s deal with the EU is great news for Scotland’s businesses. There are huge opportunities ahead – not just with this exceptional access to the EU market, but also in new markets right around the world.

Scottish Secretary Alister Jack said:

“We have an agreement on fisheries which will ensure that our fishermen, and our coastal communities, will flourish outside of the EU’s unfair Common Fisheries Policy. The UK will once more be a sovereign coastal state.

“The deal protects famous Scottish products such as whisky, Arbroath Smokies and Orkney cheddar.

“People in Scotland will benefit from a wide range of social security and healthcare rights while travelling, working and living in the EU.

“Now, Scottish businesses need to get ready. The UK Government has been preparing intensively, and working with businesses, and that will continue. The Scottish Government also needs to do its bit and take action in devolved areas - we have given the Scottish Government nearly £200 million to prepare for Brexit.

“The United Kingdom will always be a welcoming, outwards-facing nation. Our European neighbours are our friends, and that will not change. EU citizens will continue to be an important part of many of Scotland’s communities. This is a historic moment for us all. There are enormous opportunities ahead of us, and we all need to make the most of them.”

Scottish Labour leader Richard Leonard said:

“Scottish Labour has called for an extension to the Brexit process, in light of the escalation of the Covid crisis so that we avoid the economic shock we will now face.

“While it’s better that a no-deal exit has been averted, Boris Johnson’s irresponsible brinksmanship and his gross mismanagement of this process from start to finish has caused huge economic uncertainty.

“Against the backdrop of Covid, the worst crisis the UK has faced since the Second World War, the Tories have left workers and businesses on the cliff-edge of a disastrous ‘no deal’ by leaving it to the 11th hour to secure a deal.

“We must now look at the detail of the deal and move on with a plan to protect jobs, incomes and our public services in Scotland, as we face a pandemic-driven recession.”

The Herald: Tim Farron has said that his party will vote against Article 50 being triggered unless the government agrees to a referendum on the final Brexit deal. Credit: Daniel Leal-Olivas/PA Wire

Scottish Greens co-leader Patrick Harvie said: “Boris Johnson has already caused huge damage by playing games of brinkmanship right up to seven days before the end of the transition period.

“There will now be some sense of relief that the dangerous prospect of crashing out with no deal has been averted. However, there is now no time for anything but the most cursory scrutiny in either Parliament.

“The country is being given a take-it-or-leave-it deal, but we won’t be able to debate the detail, and the one thing we know is that the cost of Brexit remains high.

“As well as the financial hit, the legacy of the UK Government’s reckless approach will live on, in the broken relationships with European partners, in the lowering of workers’ rights, standards and protections, and in the hearts of people in Northern Ireland and Scotland, who are badly let down by a Brexit they didn’t vote for.

“In the long run, I believe we will look back on this as a period of extraordinarily incompetent government from the UK, but ultimately as only a brief interruption in Scotland’s place in Europe. We will take our future into our own hands and we will rejoin.”

The EU’s chief negotiator Michel Barnier said: “The clock is no longer ticking. After four years of collective effort and EU unity to preserve peace and stability on the island of Ireland, to protect the citizens and the single market, to build a new partnership with the UK.”

Mr Barnier thanked those involved in the process, adding: “This process has engaged so many citizens, businesses, stakeholders and, obviously, so many journalists. Thank you for your patience and your attention.

“Today is a day of relief but tinged too by sadness. As we compare what came before with what lies ahead.

“The UK has chosen to leave the European Union and the single markets, to renounce the benefits and advantages enjoyed by member states, our agreement does not reproduce these rights and benefits, and therefore despite this agreement, there will be real changes in a few days from now.

“As of first of January, real changes for many citizens, and many businesses, and that is the result of Brexit.

“But we have also built a new partnership for the future around four pillars.”