At the heart of the debate over independence is a deceptively complex question: who decides? It sounds easy enough, and supporters of independence think the answer is clear: Scotland decides. For the most diehard opponents of independence, there is also a simple response: the UK decides. For those who settle somewhere between these two positions, however, things get more complex. What exactly are Scotland or the UK deciding on, and how?In its judgment on Wednesday, the supreme court attempted to bring a little clarity to the debate after months of deliberations and thousands of pages of argument and evidence. The question was not independence itself, but whether the Scottish government has the power to hold a purely “advisory” referendum on independence. The ruling was instigated by the Scottish government’s own lord advocate, who referred the issue to the court in pursuit of a legally watertight means of fulfilling the manifesto promises on which the Scottish parliament’s SNP-Green majority was elected.By stressing the advisory status of a referendum, the Scottish government hoped to bypass the big problem that has kept Scottish politics in a constitutional stalemate for almost a decade now. According to the 1998 Scotland Act, which established the Scottish parliament in 1999, the union between Scotland and England is a “reserved” issue, and thus falls under the jurisdiction of the UK parliament. The 2014 independence referendum was legal because the UK government agreed to temporarily devolve the power to hold it, a process enabled by section 30 of the act; since then, successive UK governments have refused to be so co-operative in the face of repeated demands for another section 30 order from the Scottish government.The Scottish government’s argument was that a consultative vote would not directly alter the union between Scotland and England, and was therefore not relevant to reserved matters. The UK supreme court disagreed. In the words of its ruling, “a clear outcome” to even an advisory referendum “would possess the authority, in a constitution and political culture founded upon democracy, of a democratic expression of the view of the Scottish electorate”. This would therefore “strengthen or weaken the democratic legitimacy of the union, depending on which view prevailed, and support or undermine the democratic credentials of the independence movement”. Such “important political consequences” therefore made even an advisory referendum meaningfully “relevant” to the reserved matter of the Anglo-Scottish union.It is worth spelling out exactly what is being said here. On the one hand, the court is acknowledging that an independence referendum conducted by the Scottish government would have democratic legitimacy, even if it was not legally binding. This is a strikingly nationalist answer to the question of who decides. It recognises that, were the Scottish people given a choice on independence, their expressed views would meaningfully determine whether Scotland gets independence. This, you might think, is a good and correct thing, in a “constitution and political culture founded upon democracy”. And yet it is the linchpin of an argument against the Scottish government holding such a referendum.This is because, as far as the UK constitution is concerned, the answer to “who decides?” is unambiguous: the UK parliament has the final say. It can pass or repeal any law it wants by a simple majority. If other laws get in the way of doing so, parliament can change or repeal those too. If the supreme court had ruled in favour of the Scottish government, the UK parliament could have amended the Scotland Act to explicitly reserve “advisory” referendums. In constitutional terms, what the supreme court ruling says is that the Scottish people and their democratic rights are irrelevant.But it also tells us that, in political terms, they – we – do matter. We matter because of precisely that “political culture founded on democracy” with which the supreme court defended its judgment. The reason that a referendum was “relevant” to the reserved issue of the union was that if the Scots were given a say, and that voice was then ignored, it would create a cultural problem – in other words, a problem of legitimacy – for the continuation of the UK state.No matter how unpopular the UK’s government and its institutions become, it is legitimised by consent – by the idea that because we choose our rulers, we are complicit in the things they do to us. The importance of this process of legitimation is visible in the evolving architecture of the state, most clearly in devolution itself.From the early days of modern Scottish nationalism, people in Scotland have rejected the idea that they were complicit in what was being done to them, insisting that Conservative governments had “no mandate”. In 1971, Ted Heath’s withdrawal of state support from Upper Clyde Shipbuilders led to a spectacular “work-in”, during which the workers, claiming the nation for themselves, occupied their yards and forced a humiliating U-turn in Conservative industrial policy. In the late 1980s, Margaret Thatcher’s early implementation of the poll tax in Scotland led to a mass non-payment campaign that also made liberal use of nationalist rhetoric.When a Scottish parliament was finally achieved, in 1999, it was invested with the radical, democratic energy of those campaigns and others. While it has undoubtedly failed to embody that earlier spirit of extra-parliamentary radicalism, it has helped to reproduce a Scottish political culture that has its own forms of popular legitimacy, not only distinct from Westminster but often directly opposed to it. Take, for example, the protests that halted immigration raids in Glasgow’s Kenmure Street last year and Edinburgh’s Nicholson Square in May, pitching Scottish activists against Home Office officials (immigration is reserved) and forcing Scotland’s devolved police force to pick a side.The irony of all this is that the Scottish parliament was supposed to reinforce the legitimacy of the UK state, not undermine it. With sovereignty and the union safely reserved, devolution was designed to give Scotland a distinct voice within the union without threatening the union itself. And yet in permitting Scotland such a prominent outlet, Westminster has created a political system that speaks for its people far more directly and authentically than the UK government ever can, yet which is officially denied the ability to match voice to action. The supreme court judgment is an open admission of the dangers this mismatch poses to the structure of the state itself. Far from being a blow to independence, this admission presents an opportunity to conjure up those spirits of resistance, old and new, and put them to work for one last heave.