Barcelona fans will be allowed to wave the Estelada flags during the Copa del Rey final on Sunday.
Supporters had planned to celebrate with the Scottish Saltire instead, after government officials had banned the Estelada, often associated with Catalan pro-independence movements.
A Madrid judge has overturned the earlier decision, after FC Barcelona appealed saying it was “an attack on freedom of expression”.
Catalan nationalist organisations had planned to hand out thousands of Scottish Saltires, which have become a symbol of independence after the 2014 Scottish Independence Referendum.
Although Scotland voted to stay in the United Kingdom, Catalans celebrate their power to vote as the Spanish government refuses to allow a similar vote in Catalonia.The club released a statement saying: “The club celebrates that the judge’s decision will allow the free expression of legal symbols and banners by its members and supporters.”
Carles Puigdemont, the President of the Generalitat of Catalonia tweeted saying that “I will go to Madrid”, and although he is happy that the decision he calls “undemocratic” was overturned, he called for urgent solutions, and even resignations.
Aniré a Madrid, content que la justícia hagi aturat una decisió antidemocràtica. Calen una dimissió i algunes rectificacions. Urgents.— Carles Puigdemont (@KRLS) May 20, 2016
The final will be held in Athletico Madrid’s Vicente Calderón stadium.
FC Barcelona have won the competition a historic 27 times, including a 3-1 victory in last year’s final that was held in the Catalan capital.