A think-tank has suggested that if the UK voted to leave the European Union, but Scots voted to remain, such an outcome could pave the way for an independent Scotland to rejoin the EU.

Kirsty Hughes, an associate fellow at Friends of Europe, said this was one of four possible scenarios that could occur if the referendum - which could take place this year and will certainly be held before the end of 2017 - produces an overall majority for quitting the EU despite Scotland voting to remain.

The paper suggested Scotland could "push for a differentiated relationship, so that while remaining part of the UK, and being outside the EU, it nonetheless kept closer links in a number of areas".

It added: "Scotland could argue it wanted to secure or keep closer relationships with the EU, for example, on climate policy, energy, fisheries, agriculture or education".

"Clearly, the more the Scottish Government can do to keep Scotland in line with EU laws and policies, the easier it would be in the future for an independent Scotland to re-join the EU, and equally the more the costs of Brexit for Scotland could perhaps be reduced."

The report contradicts previous suggestions during the independence referendum campaign, from unionist parties and most notably from then European Commission President Jose Manuel Barroso, that an independent Scotland's quest for EU membership would be difficult to impossible.

One sticking point could be the possibility of a UK veto on such matters, as negotiations would have to take place between the Scottish and UK parliaments, as Westminster would retain the final say on such issues.

This is likely to result in "various political crises" the report said, recalling that First Minister Nicola Sturgeon has already warned this could "produce a clamour for another independence referendum which may well be unstoppable".

Friends of Europe went on to suggest that a second independence referendum could see Scotland "staying seamlessly in the EU" if it was held soon enough after the European referendum and resulted in a Yes vote.

The report will encourage the more vocal nationalists who are agitating for a second bite at the independence cherry, but political commentators have questioned the sagacity of rushing a second vote.

Ms Sturgeon is taking a similarly cautious stance and as yet has refused to explicitly outline just what stepchange would be required to embolden the SNP to demand a second referendum, wary that a second defeat would most likely signal an end to the matter.

The most recent polling data from YouGov has indicated that Scotland is the most pro-EU area of the UK, with 60% of confirmed voters wishing to remain. The UK's overall polling data returned a much narrower gap, with just 51% favouring EU membership.

However, Friends of Europe suggested that such an outcome would not be a logical precursor to an increased appetite for independence: "Might the prospect of a border between England and Scotland, with Scotland and the rest of the UK being in different trading regimes, worry voters rather than shift them towards independence?"

Another possibility posited by the paper related to a period of inaction after the EU vote where Scotland "too will find itself outside the EU, perhaps with little voice in the UK's exit talks with Brussels".

If a second independence ballot was held some years later, Scotland would then have to re-apply for EU membership.

The fourth option would be for the Scotland to try to stall the UK's departure from the EU - for instance by Holyrood refusing to repeal or revise EU laws - where the Scottish Government could "make considerable political capital out of the crisis, calling on the EU to help it remain in Europe and possibly Wales and Northern Ireland joining in this call".