It’s January 2012. Seven months earlier, the SNP won a majority in the Scottish Parliament at Holyrood, on a manifesto pledging to hold an independence referendum. The Coalition government in Westminster pledged to respond to this request, and the time to do so has come.

There will be no referendum, David Cameron announces. Alex Salmond replies that he has a mandate to hold one, and hold one he will. The UK government goes to court to prevent him from doing so, and secures a court order that Scotland’s intention to hold a referendum is illegal.

The SNP presses ahead regardless, so Westminster ups the pressure. Police Scotland are judged to be unreliable, so thousands of English police officers are deployed in Edinburgh and Glasgow. They arrest senior SNP activists and MSPs in overnight raids. When referendum day comes, riot police storm several polling stations, beating and brutalising ‘Yes’ supporters. The world’s television cameras watch on, and images of civilians bleeding and cradling broken limbs are broadcast round the world.

Turnout in the referendum is low, below 50 per cent. Those who do vote overwhelmingly vote Yes – unionists have stayed away from the polls. Under pressure from Westminster, Salmond wavers – refusing to openly state whether or not Scotland is declaring unilateral independence.

Cameron presses on with the clampdown. There are more police raids targeted at the SNP. Two prominent nationalists are charged with sedition. And Westminster moves to revoke devolution and dissolve the Scottish Parliament, under a catch-all law empowering the Government to “take all measures necessary”.

What would the outcome of such a strategy be for the Union?

Pretty obviously, it would not nip Scottish nationalism in the bud. It would inflame it – all the arguments that Westminster was a hostile power, that it loathed the idea of Scots deciding their own future, and so on, would be fuelled by a bullying Government acting as if they wanted to prove the SNP’s point. Unionist arguments about fellow-feeling, shared interests and the fundamental democracy of the shared endeavour would be undermined. Whether immediately or later, the chances of Scottish independence would be markedly increased.

Obviously – mercifully – the UK did not follow in Scotland the approach that Spain is pursuing in Catalonia. Cameron understood that he had two more practical and productive options available to him – options that were open to Madrid until a few weeks ago.

The first would have been to use the self-importance that many nationalists tend to display against them. A referendum? Well, if you really want to hold a pretenderendum as a PR stunt, then no-one’s going to stop you, but unionists should sensibly boycott it and it has no basis in law. You should be getting on with the important job of governing with the powers you already have, not wasting time and resources on self-publicising nonsense like this. A ‘referendum’ would have gone ahead, but without the participation of the unionist side it would have lacked legitimacy – the nationalists would still be there, banging their drum, but they wouldn’t have advanced much if at all.

The second was to call their bluff by granting a referendum, then winning it for No. As this is what really happened in the UK, we know the outcome – it was a risk, but a risk that paid off. The SNP isn’t defeated, but its case is hobbled for some time to come. While the defeat galvanised the nationalist vote to deliver a landslide in Scotland in 2015, the referendum campaign sowed the seeds of a unionist fightback, costing the nationalists MPs and MSPs and putting fire back into the unionist cause. Unexpectedly, it even delivered over a dozen Scottish Conservative MPs to Westminster this year.

Of the three options available, Madrid has plumped for the approach most likely to help, not hinder, the Catalan separatist movement. In doing so – the arrests at dead of night, the riot cops smashing civilians to the ground – Spain has shamed itself on the international stage.

In the backdrop to this domestic battle sit the leaders of the EU. We’ve heard a lot over the years about “European values”, and the EU’s supposed role as a champion of liberal democracy. And yet where were Messrs Tusk and Juncker when the crunch came in Barcelona? The answer: standing squarely behind Madrid, and its heavy-handed clampdown.