Homage to Catalonia: First Minister Nicola Sturgeon has never lost any opportunity to align herself and the SNP with the undisciplined Catalan separatist forces of Carles Puigdemont, regularly voicing support for their aspirations. When La Sturgeon voices support for anything she tends to do so in a shrilly noticeable way. The Spanish government has noticed.

For the First Minister this has turned out to be a significant own goal. Back in the balmy days, pre-2014, when Scottish separatism was infused with a confidence that has since been asphyxiated in the referendum ballot box, one of the strongest suits held by the SNP was the claim that an independent Scotland would remain in the European Union.

In “I’ll take the high road and you’ll take the low road” terms, this claim envisaged two possible scenarios. The first was that Scotland would never leave the EU even temporarily but would seamlessly continue its membership with a few minor adjustments to accommodate its newly sovereign status. You had to be smoking something even stronger than Presbyterian Mixture to credit that.

The low road, rather more plausible, was that an independent Scotland would exit the EU, as a formality, for about the same length of time as a Brexit transition period – however long that may be – then triumphantly re-enter the great European family, fortified in the interim by £9bn of annual oil revenues, and live happily ever after.

The fact that senior separatists could indulge in such pipe dreams demonstrates they had not taken the trouble to read through the provisions of the EU acquis (and who could blame them?) where they would have discovered a number of disturbing obstacles to their ambitions, including the perennial issue of Scotland’s future currency.

There was, however, a political obstacle that, in combination with EU law, could prove fatal to an independent Scotland’s EU membership ambitions. The veto of any one of the existing member states would be sufficient to exclude Scotland. The obvious candidate for this role of aggravating Scotland’s seldom dormant sense of grievance was Spain, concerned about separatist tendencies in the Basque country and Catalonia.

It was obvious to any observer that Spain was bound to veto the admission to the EU of any breakaway portion of a member state, pour encourager les autres. For the most part the Spanish government refused to be drawn on the question of whether it would apply the veto to Scotland, on the reasonable grounds that Scottish independence was too remote a contingency to be formulated into government policy. In Europe the dogs in the street knew that, if by any concatenation of circumstances Scotland became independent, Spain would politely but remorselessly veto its readmission to the EU. It could not do otherwise without hugely encouraging domestic separatist movements.

The SNP response was to fall back on its principal resource: denial. “Aw, come on, Jimmy, the Spanish love us, we both hate the English…” There was also, however, the other side of the coin – the EU’s own attitude to separatist entities. We now know very clearly where Brussels stands. Silence is not something one associates with the Brussels clique, but Juncker and his colleagues – even the mad dog Verhofstadt – remained unprecedentedly silent even as Spanish police truncheoned pensioners in Barcelona.

Not so Nicola Sturgeon. Hers was the voice raised in the cinema when the rest of the audience is mute in contemplation of the key moments of the film. She told her zombie party conference, peopled with numbers of ex-MPs who had recently been released by a compassionate electorate from the humiliation of serving in the imperial Parliament: “We do want Scotland to stay at the heart of Europe, but that does not mean we think the EU is perfect. Sometimes it fails to live up to its founding values of human dignity, freedom, democracy and equality.”

How to make friends and influence people in Brussels, eh, Nicola? The lesson of the past month is that even as populism continues its irresistible rise across Europe, separatism is on the decline. In Catalonia there is no doubt that every individual who supported independence turned out to vote for it, with unionists mostly boycotting the illegal plebiscite; but that produced a turnout of only 40 per cent, of which 90 per cent voted for separatism. That is lower even than the support for Scottish independence in the 2014 referendum.

The other consequence of the Catalan debacle has been to demonstrate the massive resolve of the Spanish government, backed by huge demonstrations across Spain, to maintain the unity of the Spanish state. That will dominate Madrid’s thinking for the next decade. In that climate it would be unthinkable for a Spanish government, of any political hue, not to veto a breakaway Scotland’s readmission to the EU.

The prospects for that eventuality arising are increasingly remote, but the putative response from Madrid is now certain and fatal to Sturgeon’s ambitions. The Scottish public, already more sceptical both of independence and the EU, is watching this and getting the message: there is no prospect of an independent Scotland gaining admission to the EU, so any future Yes vote would be an unquantifiable leap in the dark. That is a further nail in the separatist coffin.

Scottish separatists might console themselves with the thought that, despite its current hostility, so nihilist is Brussels’ response to Brexit that it might readmit Scotland, as a slap in the face to Britain. Even that contingency is contradicted, however, by the post-Brexit EU’s frenzied drive for increased integration against the known wishes of its populations. Separatists are not wanted and, in any case, Spain’s position is implacable. No wonder Nicola Sturgeon is now canvassing Scottish membership of EFTA, as her horizons narrow and her options wither.