For once, it didn't seem to bother the Barcelona supporters when Real Madrid cruised into a 1-0 lead at the Nou Camp. The Barcelona faithful seemed distracted. Then, when the stadium clock registered the 17th minute of the game, a tremor of anticipation swept through the crowd and 14 seconds later 95,000 Catalans rose to their feet and began chanting "in-inde-independencia". For several minutes, the greatest sporting contest in Europe became a political rally. Seventeen minutes and 14 seconds: 1714, the year when Catalan forces were defeated by Philip V of Spain after the 14-month Siege of Barcelona was ended on 11 September.

For Alex Salmond, such moments of communal nationalism must stir a mixture of admiration and deep frustration. What would Scotland's first minister give to have a popular rallying point for nationalism? Two weeks ago Celtic FC, the Scottish champions, became the first team this season to defeat Barcelona in a Champions League encounter. While it was possible to pick out a few saltires on that occasion, the main hues were green, white and orange – the colours of the Irish flag.

Angus Robertson, the SNP's leader in Westminster, is a little wistful: "The backgrounds to the cause of nationalism in Scotland and Catalonia are significantly different, especially given the Catalans' recent experience of living under a fascist dictatorship in Spain. In Scotland we are embedded in a national debate about a better future with independence. We are not protesting. So, I am wary of drawing comparisons between the debates in each country when most of the circumstances are actually very different."

As the movement for Catalan nationhood has whipped up a storm, the campaign for Scottish independence has lost some wind from its sails. Polls refuse to rise much above 30%. Yet while the SNP realises it will not yet mobilise 1.5 million people to march down the Royal Mile in favour of Scottish independence – as happened in Barcelona on 11 September – it also knows the Catalans would love the kind of constitutional relationship that exists between Scotland and the rest of the UK. It was this that brought forth the Edinburgh agreement on an independence referendum – something unthinkable even just a couple of years ago. But, as Robertson also observed: "We've still got two years to persuade the Scottish people."

Xavier Solano is a leading nationalist politician and former head of the Catalan government's Westminster office. He sees the similarities between Scotland and Catalonia but also warns against exaggerating them. "Both countries are old European nations with a distinctive culture and history and both have always shown a clear wish for self-government. Both pro-independence movements are founded on the belief that, with independence, their citizens will be better off. Each also desires to co-operate with their former rulers if independence is achieved.

"The Scottish and the UK governments, by signing the Edinburgh agreement, have demonstrated that things can be done in a democratic and civilised way. Spain and the entire world should learn from this."

But he also points out the deep emotional differences between the two movements. "You must also remember," he said, "the United Kingdom is one of the world's oldest and most mature democracies. It has respected the national identities of each of its four constituent parts. Spain, on the other hand, has economically punished Catalonia and kept it hidden from the world since 1714. It is time for the world to discover an old nation of Europe that wants to decide its own future."

Solano is espousing the Catalan sense of genuine emotional, historical and political grievance. The perfidies of Albion may be many in the eyes of Scottish nationalists but they do not begin to compare to what Catalans feel about Madrid. Sandwiched between two wars in which Scottish and English soldiers fought and died together was a horrifying civil conflict in Spain that led to Franco's 40-year dictatorship and the subjugation of Catalonia. Scotland, unlike Catalonia under Franco, has never been culturally enslaved.

David Low is a Glaswegian of Irish stock who has had property and business interests in Barcelona for 10 years. He has witnessed a change in Catalan identity in that period. "There has been a new level of self-identity among Catalans and that has bred renewed confidence. This is bolstered by the relative wealth in the region. However, I don't think Catalan independence is guaranteed as there are a significant number of non-Catalans with a vote living in the region. They have migrated there for jobs over the generations. Once you factor in the business lobby and the royalists then it's clear that there is still some work to do."

He says there is a depth of emotion built on a sense of pain and loss that Scottish nationalism can't match. "The Catalan language is compulsory in all state schools and is a symbol of independence helped by Franco's banning of it and the flag. Franco also treated FC Barcelona appallingly. Its president was murdered by nationalist forces during the civil war and Real Madrid's greatest player, Di Stéfano, was stolen from Barcelona in 1953 under orders from Franco."

In Barcelona's Plaça Reial a few weeks ago, the euphoria of the 11 September march of the multitudes was still palpable and a group of Scots in town for the Champions League game were talking self-determination with the bar staff. "We want to be independent like Scotland," said the host, who obviously believes a country is independent if it has an international football team. Perhaps, in 2014, when Scotland plays England at Wembley, the Tartan Army will rise as one and chant "freedom" in the 14th second of the 13th minute (the year of the Battle of Bannockburn).