They call it "the red effect". It has spread down Spanish streets on the torsos of hundreds of thousands of fans wearing the shirt of the national soccer team, La Roja or "The Red", and threatens to over-run even the most obdurately separatist corners of the country. On nights when the team notches up another World Cup victory it turns into a musical chant: "I am Spanish! Spanish! Spanish!" they shout joyfully. "I am Spanish! Spanish! Spanish!"

Spaniards cannot recall an outpouring of national pride similar to that provoked by the country's first-ever appearance in the World Cup final today. "Not since the Spanish civil war have there been so many flags in the streets," El País newspaper reported as Madrid prepared for an all-night party if La Roja beat Holland in South Africa this evening.

Indeed, Spain's red and gold flag still reminds some people of the civil war of the 1930s, more particularly, of the 36-year dictatorship of Francisco Franco, leader of the pro-fascist Nationalists, that followed it. Few countries in Europe, except Germany, have such an instinctive mistrust of patriotism.

Such an outpouring of national pride also raises challenging questions about Spain's vision of itself. This is a "nation of nations" according to some, who see Catalonia and the Basque country as unrecognised nations which, like Scotland, deserve their own football teams. Spain oppresses other nations, according to separatists, including to the Basque terror group Eta – which exacts its revenge in blood. The country's constitutional court disagrees. "Our constitution recognises no nation but Spain," it affirmed on Friday in a stern rebuke to Catalans who hoped a new autonomy statute might formally allow them to be known as a nation within Spain.

Hundreds of thousands of Catalans marched through Barcelona's streets denouncing the court's decision to strike out parts of the statute. The march was led by the socialist head of the regional government, José Montilla, and his two predecessors. A massive flag bearing the red and yellow stripes of Catalonia, supposedly originally drawn on by the bloodied fingers of a warring Catalan count, preceded the procession.

But the march could not have been worse timed, according to Josep-Lluis Carod-Rovira, deputy leader of the Catalan regional government and a leader of the separatist Catalan Republican Left party. "This is ridiculous," he complained. "We will end up with more Spanish flags being waved for the Spain-Holland match on Sunday than Catalan flags on the Saturday demonstration."

Barcelona did not experience the same wild celebrations that provoked gridlock in parts of Madrid after the semi-final win against Germany on Wednesday, but Carod-Rovira is right that growing support for La Roja overshadows attempts to assert Catalonia's "different" identity.

Viewing figures showed three-quarters of Catalan television sets were tuned into one of the channels showing the Germany game. As horn-tooting cars and motorbikes flying Spanish flags drove around the city afterwards, flag-waving, chanting fans gathered on Barcelona's Ramblas boulevard in a previously unseen, and unimaginable, celebration of Spanishness.

The red and gold Spanish flag that is so viscerally disliked by local nationalists has even begun to appear on Barcelona balconies. Something, undoubtedly, is changing. "You will now find people out on the streets in La Roja shirts, or with the Spanish flags that are normally considered taboo here," said Marcelino Sánchez, who was among those celebrating in Las Ramblas.

Not everyone, though, is brave enough to flaunt the sporting symbols of Spain. World motorbike champion Jorge Lorenzo, who hails from Majorca and currently leads the MotoGP category, recently declined to put on a La Roja shirt while in Barcelona. "In Catalonia it is difficult to appear in the Spanish team shirt," he said. "I don't want problems."

Singer Alejandro Sanz leapt to criticise Lorenzo on Twitter: "The worst thing is that Lorenzo thinks Catalans will like him because of this, but he is wrong. I respect all Catalans, whether they feel Spanish or not... but cowardice is another matter." Lorenzo responded by challenging Sanz to wear the shirt the next time he performs in Barcelona. Sanz immediately pledged to do exactly that in September.

El Mundo newspaper, an obsessive critic of Catalan nationalism, talked of people "coming out of the wardrobe" to admit their love of La Roja. Some analysts say clever marketing, with the team referred to by the colour of its shirt rather than the name or flag of Spain, has eased acceptance. Others simply say everyone wants a piece of the team's success.

City hall authorities in Barcelona have now bowed to pressure for a massive outdoor screen to be set up so that fans in the city can watch the final. A heavy police presence is expected tonight, too, as the Catalan capital braces for a wave of celebrations if Spain win.

For those who have supported every team that played against Spain, it will be too much. Catalan United Left leader Joan Puigcercos and Basque Nationalist Party president Iñigo Urkullu are among those refusing to support La Roja. "These people insist on taking the joy of La Roja followers as an affront," said columnist Joan Barril in Barcelona's El Periódico.

There are other reasons why Catalans now follow La Roja. Five of the players who lined up against Germany were born in Catalonia (and one, Xabi Alonso, was Basque). Seven players belong to FC Barcelona, the club some Catalans treat as a national team.

A decade ago sociologist José Ignacio Wert coined the phrase "anorexic patriotism" to explain why Spain's sporting teams routinely underperformed. He quoted coaches such as Holland's Johan Cruyff or Vicente del Bosque (now in charge of La Roja) who believed that a lack of real patriotism was a problem. "It means our boys do not get their foot to the ball, precisely because of the anorexic patriotism provoked by having the word 'España' on their shirt," he said. Wert blamed both the Franco regime and modern-day nationalists in Catalonia and elsewhere for the problem.

The problem, however, has now disappeared and the taciturn Del Bosque wants nothing to do with the debate. "Spain is not Barcelona, nor is it Real Madrid," he says. "Any victory belongs to Spanish soccer."

Rafael Cortés, a letter-writer to Barcelona's La Vanguardia newspaper, came up with a pragmatic solution that best expresses the double identity of many Catalans. They could protest on Saturday and celebrate on Sunday, he said. "What we should do is celebrate victory by shouting our support in Catalan and waving both our flags. Let's shout: 'Long live Catalonia! Long live Spain!'"

Of course, La Roja have to win first.

• This article was amended on 14 July 2010. The original referred to thousands of Catalans marching through Barcelona's streets. This has been corrected to reflect estimates ranging from 425,000 to well over one million people.