Reality Check: Could Scotland inherit the UK's EU membership?
The claim: An independent Scotland could remain a member of the European Union while the rest of the UK left, in effect taking over Britain's membership of the EU rather than having to start a fresh application to join as a new country.
Reality Check verdict: The situation is unclear. If Scotland were to hold a second referendum, and become independent, it could apply to become a member of the EU in the usual way. And it is now more plausible that EU member states would try to speed up the process for Scotland than it would have been at the time of the 2014 independence referendum. But we cannot say if it would be able to continue as a member without going through some sort of application process.
The UK as a whole has voted to leave the European Union. But Scotland voted in favour of the UK staying in by 62% to 38% - with all 32 council areas backing Remain.
In response to the result, Scotland's First Minister Nicola Sturgeon said: "Scotland has voted to stay in the EU and I intend to discuss all options to do so."
She said that the option of a second referendum on Scotland's independence was "on the table" and "highly likely".
But how might an independent Scotland stay in the EU if the UK as a whole has chosen not to remain? Would Scotland have to re-apply for EU membership?
Speaking to the BBC, former First Minister Alex Salmond said: "The logic would be that Scotland would have the option of remaining within Europe while the rest of the UK left Europe, so there would be no logic in saying, 'Let Scotland go out and then come back in again.'"
Even if a second referendum were to be held before the UK concluded its exit negotiations with the EU, and the Scottish people were to vote in favour of independence, it isn't clear that Scotland could automatically remain. If part of an existing EU country became independent and had to determine its membership of the EU as an independent state, this would be an unprecedented situation.
The existing EU Treaties contain no clause that sets out what would happen if this were to be the case.
In 2012, the House of Lords Economic Affairs Committee sought a clarification about how Scottish independence might affect its EU membership from the then European Commission President Jose Manuel Barroso. In his response, Barroso wrote:
"Although there is no certainty, it appears an independent Scotland would not automatically become a member of the EU but would instead have to re-apply and complete a process of accession... A new independent state would, by the fact of its independence, become a third country with respect to the EU and the Treaties would no longer apply on its territory."
Mr Barroso added that an independent Scotland would be able to apply to become a member and the application would be treated in the usual way. This would mean that, if the other member countries accepted the application unanimously, an agreement between Scotland and the EU would be negotiated, the EU Treaties adjusted and, finally, ratified by all member states.
But during the Scottish referendum campaign in 2014, it was unclear whether the EU would permit an independent Scotland to negotiate as a de facto EU member, which would place it on a fast track to accession, or whether the normal, and much lengthier, accession process would be applied. This shorter process would require member states to agree to the EU Treaties being amended to allow Scotland to join, via Article 48 of the Treaty on the European Union.
Steve Peers, professor of law at the University of Essex says: "It's now much more plausible that other member states would agree to amend the Treaties to transfer the UK's membership of the UK to Scotland."
The longer process would require a formal application via Article 49, the usual process by which prospective members can apply to join the EU.
During this time, there was also some discussion on whether the EU would make it difficult for Scotland to join the EU so as to discourage independence movements in Spain and other countries from doing the same. However, the context for Scotland's EU membership has become much more complex with the UK's decision to leave the EU.
Prof Peers also writes: "The political context of the issue would now be different: unlike in 2014, facilitating Scottish EU membership would not be now seen as creating a kind of incentive for a member state to split up, given that the UK is leaving the EU anyway."
Whatever route Scotland might take to rejoin the EU, the EU stipulates that all new members are expected to adopt the euro, if they meet the necessary criteria. The same rules would apply to Scotland, unless it was able to negotiate a new opt-out.