Just days after the UK voted to leave the European Union, the SNP MEP Alyn Smith told the European Parliament: “I want my country to be internationalist, cooperative, ecological, fair, European.” In pleading with colleagues to respect Scotland’s vote to remain, he was afforded a standing ovation. First Minister Nicola Sturgeon’s reaction to the vote had stated categorically that removing Scotland from the EU against its clearly stated will would be “democratically unacceptable” and that everything was “on the table”, including a second independence referendum. Independence, it seemed, was intricately linked to the EU referendum outcome.

Subsequently, in the Scottish Parliament, Nicola Sturgeon was granted the authority to negotiate with EU representatives on behalf of the Parliament. Significantly, it has, for the first time, declared an intention to pursue a decidedly different foreign policy from Westminster.

The SNP has had something of a rollercoaster of a relationship with the EU: favourable in the 1950s as a means of ensuring markets for Scottish exports; against it in the 1960s until the early 1980s, fearing power moving even further away from Edinburgh; positive again in the early 1990s, arguments for “Independence in Europe” coinciding with the EU’s advancement of a “Europe of the Regions”; and tepid support since devolution. But as the 2014 independence referendum approached, EU membership took on an important role in the SNP’s strategy.

On the practical side, an independent Scotland within the EU would continue to access the benefits of EU membership it held at present through the UK, with the addition of a more direct voice in EU decision-making, increased representation in the European Parliament and a recognised role as a small, independent state within the European project. On the strategic side, the proposed independent membership of the EU allowed the SNP to differentiate Scotland more distinctly from Eurosceptic England and to engage in traditional statecraft activities in Brussels.

The challenge for the SNP, in 2014 as now, is to make a coherent argument as to why it proposes to leave one political union (the UK) but want to (re)join another, the EU. This isn’t as inconsistent as it might first appear: nationalism and European integration can be complimentary rather than contradictory ideas. They challenge the traditional conception of the state from both above and below and help to emphasise the post-sovereignty ideas of re-scaling and interdependence, themes advocated in 2014.

The outcome of the referendum has provided the “material change in circumstances” within the UK that the SNP suggested may precipitate a second independence referendum. However, Brexit is a double-edged sword for the party. Yes, it makes another referendum more justifiable and more likely to occur. But it does not necessarily follow that a second independence referendum in these circumstances would be any more likely to succeed than the first.

While it is clear from the EU referendum that the Scottish electorate wants to remain in the EU, it is far from clear that it would want to do so at the expense of remaining in the UK. "Better Together Redux" might simply frame the campaign as a “UK versus EU” debate, with the former likely to prevail in a battle for hearts and minds.

EU membership was just one of many issues that remained unresolved during the independence referendum. Brexit provides more questions about that membership, as well as the currency an independent Scotland would now use, and how the common British Isles travel area might operate if some parts of it were no longer EU members but others were. Brexit provides another opportunity for the SNP to address these issues and to move forward with a second independence referendum. But it also makes winning such a referendum more difficult.

The SNP’s post-Brexit strategy is, like the new UK Government’s, still in its infancy. Much of it will be shaped by outside events: the actions of the new Foreign Secretary Boris Johnson and (marvellously titled) Secretary of State for Exiting the EU David Davis; the triggering of Article 50 and the timeframe for negotiations; and how the First Minister’s more informal discussions progress in Brussels. As with much of UK politics at the moment, the shifting sands of the constitutional debate, internally and externally, make building a long-term strategy nearly impossible. It is far better in the short-term to observe, consider and react than to go all-in on a pair of eights.

But, then again, even pocket aces can lose when all the cards are dealt.

Dr Harvey is a teaching fellow at the University of Aberdeen and will appear at the Edinburgh International Book Festival in a discussion of these themes.