AHEAD of the 2014 independence referendum, then European Commission President Jose Manuel Barroso said it would be "extremely difficult, if not impossible" for an independent Scotland to join the EU. Seven years later, the mood music in Brussels is palpably different. Now, from an EU perspective, the UK is the one causing problems not Scotland.

EU member states may not welcome the idea of an already difficult EU-UK relationship becoming yet more unpredictable if the UK fragments. But that Scotland voted strongly for remain in 2016 is still much appreciated in the EU. Scottish politics looks rather sane and normal compared to Westminster’s politics over the last few years (even if the culmination of the Sturgeon-Salmond spat earlier this year caused some raised eyebrows in Brussels).

In February, leading German think tanker, Dr Barbara Lippert, even opined that “Scottish accession is certainly an attractive prospect”, comparing it to that of Finland, Austria and Sweden in 1995. Off-the-record, EU diplomats will comment they understand better now why independence is an issue in a way they didn’t in 2014.

So Brexit may have boosted EU-Scotland relations even while, on the down side, undermining EU-UK ties, damaging Scotland’s economy today, and setting new challenges for the prospectus of independence in the EU, not least on the border issue, compared to when the UK was a member state.

READ MORE: Alison Rowat: Is Michael Gove a secret agent for the SNP?

But none of this means that it’s actually in Scotland’s interests that the EU-UK relationship continues to be fractious and confrontational, with periodic frank incredulity on the EU side. On Tuesday, Lord David Frost rather bizarrely and undiplomatically told the Commons Foreign Affairs select committee: “We don’t make threats in quite the same way as I think some players in the EU do.” This from a government that has twice threatened to break its international Withdrawal Agreement with the EU over the Northern Ireland protocol.

There were those on both EU and UK sides who had hoped, at the end of last year, that agreeing the Trade and Cooperation Agreement, and removing the ‘no deal’ scenario, would allow a more positive reset of relations in 2021. Instead, Brussels’ brief missteps on vaccines for Northern Ireland and sustained and intentional UK belligerence on the protocol and elsewhere have meant a sustained worsening of relations. No one now expects serious improvement in the near term. Fond hopes of a structured, close foreign policy relationship are long gone.

There may, perhaps, be some positive spin-offs for the Scottish Government here as it treads its softly-softly para-diplomacy path in key EU capitals, notably Berlin, Brussels, Dublin and Paris. But, overall, there are challenges enough from Brexit and the hard trade deal agreed by Downing Street for Scotland.

Each new monthly set of statistics shows the growing Brexit impact, since the start of the year, on EU-UK trade across a range of sectors. Scotland’s devolved government is taking action where it can to offer support and advice to businesses and others struggling with the new bureaucracy and non-tariff barriers that now abound and that have cut profitability or even, especially for some smaller firms, made operating no longer worth it.

A better, more constructive EU-UK relationship might make it possible to, at least, find ways to ease some of the inevitable barriers the new trade deal puts in place. Certainly, the last thing Scotland’s economy or businesses need is the risk of an EU-UK tariff war which looked possible over the fractious stand-off over Northern Ireland – even if a temporary truce is now likely on export of sausages and other chilled meats.

READ MORE: David Leask: Why people on both sides of the constitutional divide are in danger of being duped

More positive relations are also important for Scotland and the UK’s wider security – including for shoring up multilateral institutions, for police and judicial cooperation and for vital European cooperation on the COP26 climate summit in Glasgow this autumn.

Yet, a hard Brexit was the UK’s choice. And, overall, the mounting and predicted negative impacts of Brexit can only be assuaged by the UK Government climbing off its ideological unicorn of refusing alignment with some EU rules and participating in a wider range of EU programmes.

The Johnson government is not about to do this. But in a volatile world, where UK influence has been seriously lessened by Brexit, prioritising building positive EU relationships again would still be a plus.

There is little the Scottish Government can do to influence this EU-UK relationship. Both under Theresa May and under Boris Johnson the devolved administrations have been shut out from any serious consultation or input into decision-making. That impacts too onto Scottish-EU relations. If Scotland’s government or MPs were influential, even to some degree, on how the UK approaches EU matters, it would be seen as more relevant in Brussels and EU capitals. But they have no influence – and the EU knows that.

Even so, Holyrood efforts to stay aligned to EU law in devolved areas might be welcomed in Brussels. But the UK’s centralising, post-Brexit Internal Market Act looks set to undermine those plans.

Ironically, warmer Scotland-EU relations do not even help the EU-UK mood music. Downing Street looks sourly and suspiciously at the EU’s good-natured attitude to Scotland, seeing a Remainer love-in or even, it fears, under-the-radar support for independence.

READ MORE: Are we what we own? Maybe not any more, says Teddy Jamieson

So, in the end, is a difficult EU-UK relationship good for the independence cause while damaging for Scotland’s EU relationships as a devolved part of the UK? Perhaps. The contrast in EU attitudes to the UK and to Scotland is almost as sharp as that between UK and Scottish governments’ views of the EU. A legal, constitutional ‘yes’ to independence could lead to a warm and relatively rapid return to the EU.

But the less stable, more populist and confrontational the UK is towards the EU, the more wary EU governments may be of the UK’s fragmentation. Sympathy for the goal of independence in the EU may lessen, if it’s seen to imply an increasingly unstable rest of UK in the years ahead.

In the end, the Scottish Government is doing what the UK government is not: keeping good relations with the EU. But there is an unstable EU-UK, UK-Scotland, Scotland-EU triangle here. And where it may lead is unpredictable, unless the UK, contrary to all expectations, finds some of its old diplomatic skills towards its one-time European allies.

Our columns are a platform for writers to express their opinions. They do not necessarily represent the views of The Herald.