Image copyright AFP

Brexit has transformed the debate over independent Scottish membership of the EU.

In the 2014 referendum campaign, the EU's top official actively discouraged the Yes movement.

The then president of the European Commission, Jose Manuel Barroso, said securing membership would be "extremely difficult, if not impossible" for Scotland.

Several EU foreign ministers also made clear an independent Scotland would need to apply to get back in, contradicting the Scottish government's plan to seek continued membership.

That was when the UK was a full member of the EU. It enjoyed the solidarity of the other 27 countries.

With Brexit, that can no longer be relied upon.

That's not to say serving EU leaders want to promote Scottish independence.

Some countries, like Spain, will avoid doing anything that might encourage the independence movements within their own borders.

Image caption Edgars Rinkevics is Latvia's foreign minister

Most will want to avoid being drawn into what they consider as the domestic politics of the UK.

Latvia's long-serving foreign minister, Edgars Rinkevics, told BBC Scotland his country deals with membership applications on a "case-by-case" basis.

However, he made clear an application from within the UK, under Article 49 of the Treaty of the European Union, would be welcome.

"Whenever somebody in the UK decides to apply Article 49, we would be the staunchest supporters of (the) Article 49 process," he said.

Asked if he meant an application from part of the UK as well as an application from the UK as a whole, he said "I will leave it for you to decide."

His diplomatic caution is not untypical.

Asked last week if there was a way back for Scotland, the EU's chief Brexit negotiator, Michel Barnier, said simply: "We will see."

A change in attitudes

It is easier for those who have left high office to be more candid.

The former EU council president, Donald Tusk, said at the weekend there would be "empathy" for a Scottish membership application.

His predecessor, Herman Van Rompuy, has also acknowledged that Brexit has changed EU attitudes to Scottish independence.

One EU official told BBC Scotland last year that change amounted to a "paradigm shift".

Media playback is unsupported on your device Media caption Donald Tusk: "Sometimes I feel very Scottish - especially after Brexit"

That is not to say the path to EU membership would be without complication.

The EU requires new members to sign up to joining the euro, although Sweden offers a masterclass in how to avoid actually adopting the currency.

The EU also requires its members to reduce any budget deficits to 3% of GDP or lower.

If an independent Scotland's deficit was anything like the 7% figure the Gers report ascribes to the devolved nation, it would need to agree measures to bring that down.

The referendum question

An assessment by the European Policy Centre concluded that while an independent Scotland could not expect "special treatment" from the EU, the bloc should "engage positively" with it.

One key issue would be the manner in which Scotland secured independence. The EU would frown upon a referendum like the one held in Catalonia despite Spanish opposition.

That is one reason the first minister, Nicola Sturgeon, wants any indyref2 agreed with the UK government and underpinned by powers transferred from Westminster.

One senior MEP told me privately that SNP politicians could help their cause further by distancing themselves from Catalan nationalists.

Image copyright AFP

In those circumstances, the MEP suggested, Spain would find it easier to support an independent Scotland's membership of the EU.

All 27 member states must approve any application.

There is another important change Brexit brings to this debate: the border question.

If an independent Scotland joined the EU it would be inside the European single market and customs union, while the rest of the UK was outside.

This would logically require a system of checks on goods crossing the border between Scotland and England, which both the UK and Scottish governments say they do not want.

Image copyright Getty Images

Perhaps these checks could be minimised as Boris Johnson has promised they will be across the Irish Sea, which has effectively become a trade border as a result of Brexit.

But the evidence from the Irish example is that the EU is likely to insist on some checks on goods coming into the European single market from the UK.

While the EU offers Scotland barrier-free access to a much larger potential market, the vast majority of Scotland's current trade is with the rest of the UK.

In the 2014 referendum there was an argument about whether or not an independent Scotland could become an EU member state.

In any future campaign, the argument is more likely to focus on the terms of membership and whether or not swapping the UK union for the European version is a good idea.