ELS Segadors – the Catalan national anthem – harks back to a battle in the past, just like Flower of Scotland.

Rewritten in the late 19th century from a much longer traditional poem, it references the Reaper’s War of June 1640 during which Catalan peasants rose up against oppression and took control of Barcelona with much bloodshed on both sides.

In its setting for orchestra or band, it is a stirring piece of work with a particularly memorable chorus for each verse (“strike with thy sickle” is the somewhat violent, if archaic, instruction, repeated three times) and it was being sung with gusto and passion at almost every event in Barcelona that I attended last Monday, which was La Diada, Catalonia’s national day.

The night before, I had met not one but two of the senior political figures who were jailed after the 2017 Catalan Referendum. The event that we were attending was a conference on self-determination organised by the EFA/Green Group in the European Parliament which brought together people from a range of stateless nations and included contributions from, among others, Wales, the Faroe islands, the Basque Country and Quebec.

As part of it, I had been invited to take part in an on-stage public conversation about independence with Oriol Junqueras, the president of Esquerra Republicana and formerly the vice-president of the Catalan government.

Our discussion was friendly and seemed well appreciated by a large audience in a very hot university atrium. Then at the conference dinner afterwards, I sat opposite the engaging Raul Romeva, the former Catalan foreign minister.

After the referendum, Oriol was sentenced to 13 years in prison for sedition and misuse of public funds, while Raul received a 12-year term. Both were banned from holding public office for the same period and although they were pardoned in 2021 after four years of detention, that ban still holds.

It is therefore little surprise that currently, with the prospect of the Spanish socialist government being able to form a new administration after an inconclusive election in July hanging on the votes of the Catalan and Basque nationalist parties, talk of amnesty is in the air. This was the principal demand articulated in speeches at the various rallies and events I attended on La Diada and it was the main topic of conversation between many of those at the conference.

Of course, no Scottish independence-supporting politician has yet been jailed for their beliefs or actions but there are those – like George Foulkes – whose rhetoric on matters such as Scottish Government expenditure on constitutional issues comes close to advocating such a thing. However, Westminster hostility to even a devolved parliament is now very clear and when a prominent Labour shadow cabinet member explicitly suggests learning lessons from Catalonia on how to beat nationalism, then we should be on our guard. I can think of several Tories who wouldn’t be adverse to a show trial of indy supporters, to be honest, and some journalists too.

But there are also striking similarities between our respective positions.

The route to independence, in Scotland as in Catalonia – and in other places as well – is being blocked by governments which cannot live with the prospect of a radical and freely expressed choice for the future by citizens of a clearly discrete and historically founded national unit but instead devote massive resource and political capital to crushing dissent.

That implies a need for radical, modernising, constitutional reform based on a new adherence to democracy and the highest of democratic standards.

We are also both experiencing understandable frustration and anger from nationalists who believe that there is a simple solution to the very complex issues facing us, and who have as a result turned against those who are trying to find a way forward.

It is scarcely credible that some who were imprisoned or otherwise persecuted for their selfless work on independence should be denounced as faint hearts and backsliders in almost exactly the same way as some attack the SNP leadership, but I did hear it and see it in Barcelona on Monday albeit – as in Scotland – from the fringes. There was also evidence of the same degree of magical thinking about taking one final leap to be free, though the evidence from Catalonia bears out the difficulty and danger of attempting that route.

Over the years, the attitude of the SNP to other national movements has ebbed and flowed. A desire not to be confused with “regional” politics on the European level has been an element in that situation as has the focus on ensuring that our constitutional progress is rooted in entirely peaceful principles. No-one has suffered, nor should suffer, so much as a nosebleed as a result of the cause, as Alex Salmond used to argue.

We need to keep hold of all that, but also recognise that there are strengths in working together. In the current constitutional review within the SNP there is a place for debating how we formalise our work with other countries, including through our continuing involvement with the European Free Alliance.

Seeing ourselves as others see us can be a positive experience as well as a negative one. Our presence in the EU is missed and there is a strong desire to welcome us home as an independent country. Our continuing strength despite the difficulties of the past year is recognised as is the strong ongoing support for independence, confirmed in a poll this week.

To our neighbours and friends, our glass is not half empty, but half full. Many envy it and all want to work with us to achieve greater things together.

When asked at the conference for my final thought about our common cause I suggested that we needed to go out into the world positively, with a confident smile on our faces. That is because we are still moving in the right direction and if we do so alongside others, we can achieve even more.