Nicola Sturgeon's voice was calm and measured but her words were bombshell.

The First Minister, responding to the UK's decision to separate from the EU, said this represented a "material change" in circumstances.

As politics-watchers know, those are the magic words recited to conjure up a second referendum on Scottish independence.

To many south of the border, the SNP leader's address will have been just one of many reactions fired out by their TV screens and mobile devices since the early hours of Friday morning. But in Scotland the groundwork has been laid for some time.

The 2016 SNP manifesto pledged:

"We believe that the Scottish Parliament should have the right to hold another referendum if there is clear and sustained evidence that independence has become the preferred option of a majority of the Scottish people -- or if there is a significant and material change in the circumstances that prevailed in 2014, such as Scotland being taken out of the EU against our will."

Sturgeon took that document to the Scottish electorate in May and was returned handily as First Minister, though losing her party's majority in the process. That, she will argue, gives her a mandate to seek a second referendum, and while the Unionist parties disagree Sturgeon's position is strengthened by the presence at Holyrood of six pro-independence Green MSPs. That means there is a majority in place to pass legislation for another vote on seceding from Britain.

Constitutionally, the power to hold a second referendum is held by the UK Parliament and that body would have to legislate to allow a do-over of 2014's vote to go ahead. There is no legal obligation on MPs to grant Sturgeon's wish but if Westminster denied her request, the First Minister could organise a consultative referendum to demonstrate the will of Scottish voters.

If a majority backed Yes in that contest, the pressure would be significant on Downing Street either to recognise the result or legislate for a binding vote. That pressure would likely include international interventions, particularly if protesters take to Scotland's streets demanding their democratic will be recognised. The UK would face accusations that it was holding Scotland hostage.

The SNP put its case for independence to the country in 2014, losing by 55% to 45% to the pro-Union Better Together campaign. A key reason for that defeat, according to commentators, was the Nationalists' currency plans, which assumed an independent Scotland would continue to use the pound and be overseen by the Bank of England. However, Chancellor George Osborne ruled this option out, declaring in a February 2014 speech in Edinburgh: "If Scotland walks away from the UK, it walks away from the pound."

If she does pursue a second referendum -- and she says it's "highly likely" -- currency and other issues remain stumbling blocks.

The burden of proof still lies with Nicola Sturgeon. She must convince Scotland that the economics of independence are sound, and that includes a viable currency plan. She will also have to allay fears about breaking away from the UK at a time of turmoil for Europe, with one member state heading for the exit and others facing calls at home to hold plebiscites of their own.

And Europe itself could prove to be a thorny matter. EU leaders warned in 2014 that a separate Scotland would cease to be a member of the community should it vote to quit the United Kingdom, which is the member state and signatory to the treaties. Following Britain's vote for "independence", attitudes on the Continent might soften.

However, the Spanish would still have to be won over, given their prior hostility to Scottish independence for fear it could further embolden their own nationalists in Catalonia. And if she leads the SNP into a second ballot on an avowedly pro-European platform, does she automatically alienate a significant slice of the 38% of Scots who backed the Leave campaign?

Here's another spanner to throw in the works: A June poll by TNS put a Brexit scenario to Scottish voters. If the country was dragged out of the EU against its will, how would you vote in a second independence referendum? With the don't knows removed: 56% No, 44% Yes. A re-run, it seems, would produce the same result.

This is democracy in all its gory glory. Unpredictable and largely unmanageable. Full of contradictions and frustrations.

Though Nicola Sturgeon has something Alex Salmond never did: A moral case for her preferred constitutional outcome. More than six in ten Scots voted to remain in Europe but now we will be forced to leave. The manifest injustice of that, the disregard it demonstrates for the sovereign will of the Scottish people, adds some arrows to Sturgeon's bow. And if anyone can coax a majority over to the Yes side, it's her.

Don't bank on British politics quietening down after Thursday's poll. Things are about to get much, much more interesting.

Analysis by Stephen Daisley, STV's digital politics and comment editor. You can contact him at stephen.daisley@stv.tv.