Some time in the next two years, Scots will face another referendum on whether the United Kingdom should remain in the European Union. This issue has become deeply entangled with the question of Scotland’s place in the UK. Last year’s referendum was about independence-in-Europe and since the 1980s the EU has provided a vital external support system for proposals for Scottish independence.

First Minister Nicola Sturgeon has suggested that a UK withdrawal from the EU (Brexit) should require the consent of all four home nations. While this will not be acceptable to Westminster, there would be a new constitutional crisis should Scotland vote to stay in the EU while English votes forced it to leave.

How likely is such a scenario? Over the last year, polls have shown growing support for staying in Europe throughout the UK, no doubt for hard-headed economic reasons. Surveys over the years, moreover, have thrown doubt on the image of Scots as enthusiastic Europhiles.

They are, at most, slightly less Eurosceptic than their neighbours. Nor are nationalists especially pro-European. Supporters of all parties in Scotland are less Eurosceptic than their counterparts in England, with the strongest support coming from Liberal Democrats and Greens, followed by Labour and the SNP.

Yet this is not the end of the story. Voters are swayed by the way issues are framed by opinion leaders in particular contexts, especially where they lack detailed information. Here, Scotland is different. It lacks the obsession with Europe that marks some sections of the political class in England. Ukip is a minor presence here and all the other parties are, broadly, pro-European.

Business, trades unions and civil society are favourable to Europe and it is difficult to see where organized support for Brexit would come from, in contrast to the well-organized Euroscepticism in England. Euroscepticism has been increasingly linked to concern about migration and this issue has also been framed differently in Scotland, although again public attitudes themselves are not much different.

Opinion on Europe can be volatile and voters are swayed by the context and the issues at stake. So there are some surveys suggesting that Scotland and England could vote in opposite ways. The latest was a Panel Base survey showing that just over half of English voters would opt to come out of the EU while two thirds of Scots would vote to stay in.

This suggests that the renegotiation of UK membership by David Cameron and the referendum campaign will be crucial. It has been very difficult so far to work out just what the issues are and what is to be negotiated. The referendum was initially proposed as a way for Mr Cameron to contain the challenge of Ukip and keep his own party’s eurosceptics on board.

The implication was that the UK could negotiate a new position as a semi-detached member of the EU, accepting the single market but opting out of social measures or moves towards political union. A wide-ranging Balance of Competences review was launched to identify powers that could be returned to the UK. The review, however, failed to identify anything important that could usefully be repatriated and has been quietly sidelined (although the reports are available on the web). Instead, the Conservatives sought to link the issue to concerns about migration by questioning the free movement of labour that has allowed EU citizens to work freely in the UK.

It was promptly made clear that free movement is itself a pillar of the internal market and that the UK cannot have one without the other. So the Government has retreated again, and is arguing about marginal changes in welfare benefits available to EU workers. It has also sought to enlist the support of other members states so that changes can be introduced for the EU as a whole rather than in the form of more opt-outs for the UK.

Whatever changes the UK Government manages to negotiate with the EU will affect Scotland. Successive Labour-Liberal Democrat and SNP administrations have taken a more expansive view of immigration on the grounds that Scotland needs to replenish its population to face demographic challenges and provide skills for development.

The Scottish Government has reaffirmed its support for a social dimension to Europe, to complement the emphasis on market competition, in contrast to the UK Conservatives. Changes in welfare benefits may impinge on the new responsibilities being devolved to Holyrood following the Smith Commission. British eurosceptism and constant demands for change have alienated much of European opinion, although Mr Cameron is seeking to repair the damage with his engagement with other member states.

Scottish governments, in contrast, have consistently sought to present themselves as good Europeans, seeing this as the best way to gain influence. Yet the SNP have shown a certain hesitancy in their practical commitment. Their independence proposals suggested that Scotland would inherit much of the UK’s relationship with Europe, including the various opt-outs.

For obvious political reasons, they dropped suggestions of joining the euro and opted for retaining the pound sterling, which would leave them in the UK monetary zone, detached from the central core of the Union.

Scotland is caught in a triple political turmoil: Europe’s crisis; the UK’s troubled relationship with Europe; and Scotland’s continued debate about its place within the UK. There are three scenarios for the EU. It could collapse under the weight of the euro crisis and its failures over foreign policy and migration. It could respond to these by tighter integration and a federal union.

It could divide between a core of countries committed to closer union and a semi-detached periphery. The UK could leave the EU altogether. It could join a federal union (which is highly unlikely). It could negotiate a semi-detached relationship on the periphery. Scotland’s choices follow from these. It could leave the EU along with the rest of the UK.

It might leave the UK and stay in the EU, which implies a rerun of the 2014 referendum; but it would need to decide this time whether it is to be a core or a peripheral EU member. Finally it could stay within both the UK and the EU and muddle through constitutionally as it gained more powers and the UK Government managed to contain euroscepticism – but it could find reconciling the two increasingly difficult.

The EU renegotiation is to be conducted by the UK Government, with a predominant role for the Treasury, traditionally a centralizing force within the state. There are promises of consultation with the devolved authorities, as with civil society.

The Scottish, Northern Irish and Welsh administrations, for their part, have called for something stronger, given their specific interests and the existing convention that their powers should not be changed without their agreement. Given the linkages between EU reform and the internal constitution of the UK, there is certainly a case for arguing that these negotiations should not be a Whitehall monopoly.

Michael Keating is Professor of Politics at the University of Aberdeen, Director of the Centre on Constitutional Change and Senior Fellow in the Economic and Social Research Council’s UK in a Changing Europe programme.