The BBC reports that Barcelona fans will now be allowed to bring pro-Catalan independence flags to Sunday's Copa del Rey final with Sevilla.
Supporters had planned to have Scotland flags at the Vicente Calderon after the government's representative in Madrid decided not to allow Estelada flags for "operational and security reasons".
But a Madrid judge has overruled that decision after Barcelona appealed.
The club had said it was "an attack on the freedom of expression".
After the flag was banned, Catalan nationalist organisations had decided to hand out 10,000 Scottish Saltires at the Madrid final.
Scotland voted to stay in the United Kingdom in 2014, but the Spanish government will not allow Catalonia a similar referendum.
"We've chosen this symbol because it highlights the different treatment that Catalonia receives from Spain, compared with the UK government's treatment of Scotland," a group of bodies said in a statement
Meanwhile, the Associated Press reporting on the same story has said the Catalan separatists can display pro-independence flags at the Copa del Rey final on Sunday, when Barcelona will face Sevilla for the title, according to a Spanish court ruling.
The Madrid-based court accepted the appeal filed by Barcelona and a lawyer’s association to challenge the Spanish government’s ban of the flags announced earlier this week.
Government officials had argued the ban of the politically charged flags formed part of a group of security measures being implemented for the game at Vicente Calderón.
Barcelona said the ban of the Estelada flag symbolising support for Catalonia’s breakaway from the rest of Spain was an attack on the freedom of expression.
Pro-independence flags have become a common sight at Barcelona’s home matches in recent years during an upswing of separatist sentiment in the north-eastern region. The club have been fined by Uefa because of pro-secession chants and flags displayed by their fans during Champions League matches.
The initial ban by the government sparked a debate in Spain, and was heavily criticised by politicians from Catalonia and Barcelona, the region’s largest city. Catalonia’s pro-independence regional leader, Carles Puigdemont, originally responded to the government’s ban of the flags by saying he would not attend the final. He then changed his stance and said he would go after the court ruled to permit the flags.
Copa del Rey finals in recent years have been used by separatists among Barcelona’s large fan base to display pro-independence flags. Spain’s King Felipe VI was loudly jeered by both Catalans and Basques before last year’s final between Barcelona and Athletic Bilbao at the Camp Nou.
Barcelona, who won La Liga last weekend, will also be trying to defend their cup title. Sevilla won their third straight Europa League final on Wednesday.