Catalan separatists danced as speakers blasted "Invincible! Invincible!" after pro-independence groups won a regional election framed as a referendum on independence from Spain.
"I can't believe it, my heart is racing!" said Claudia Cardona after a giant TV screen set up in a central Barcelona square announced the win.
Cardona, who wore a t-shirt with a "estelada", a Catalan separatist flag with a lone white star against red and yellow stripes, just turned 18 and she voted for the first time in her life.
She cast her ballot for the pro-independence Together For Yes group which will hold an absolute majority in the Catalan parliament if it teams up with the radical left-wing, secessionist CUP party.
"With this result we can start a process of negotiation that leads to Catalonia becoming its own state," said Cardona, a translation student who specialises in English and Arabic, as the crowd around her chanted "Independence! Independence!".
The Together For Yes group has vowed to go ahead with a "road map" to set up an independent Catalan state within 18 months, despite fierce opposition from Madrid, a pledge it made before the election that it said it would implement if it won.
Supporters of the alliance were gathered outside the Mercat del Born, a former market hall in Barcelona that now houses a museum and cultural centre built around the ruins of the 1714 siege of the city during the War of Spanish Succession.
For Catalan nationalists the defeat at the hands of Felipe V's troops marked the end of their regions freedom and the beginning of their domination by Madrid.
They chanted "President! President!" when Catalonia's nationalist regional president Artur Mas, who called the early election, took the stage.
"We have won. This is a victory of yes and a victory for democracy," he bellowed.
The crowd, which included retired couples, large groups of friends, and families with young children in tow, danced while speakers blasted "Invincible! Invincible!" throughout the building.
"It's great, indescribable, sublime," said Arnau Font, an 18-year-old advertising student who came from Girona, about 100 kilometres (60 miles) north of Barcelona, for the celebration.
"It is very motivating, encouraging, because it clearly shows that the people of Catalonia want independence," he added.
"I want us to separate from Spain because as long as I can remember all we get are attacks, threats, like these latest ones over our exit from the euro, or about the banks."
Spanish officials warned in the lead up to Sunday's vote that Catalans would be stripped of their nationality and could plunge into financial chaos like Greece if they break away.
Font was surrounded by a sea of Catalan separatist flags, while the flags of other separatist regions like Canada's Quebec, France's Brittany and Spain's Basque Country could also be seen.
The crowd later went silent as people, some in tears, began to sing "Els Segadors", Catalonia's anthem, as journalists from around the world who flocked to Barcelona to cover the vote watched from a podium.
Many in the crowd were decked out in separatist paraphernalia.
Loli Dominguez, a 52-year-old housewife, wore a watch, necklace, bracelet, hat and earrings decorated with the colours of the Catalan separatist flag.
Even the umbrella she brought because of the threat of rain that never fell had the red and yellow separatist flag.
"Independence will be done by the people of Catalonia, it doesn't matter if Madrid recognises it or not," said Dominguez, who migrated to Catalonia from the western region of Extremadura over 30 years ago.
"I left because there were no opportunities for me there and this is my home now."
At times the crowd broke out into chants of "Independence! Independence!" and took photos of the scene which they promptly posted on social networking sites.
"This is a process, a road," said Albert Llorenc, a 51-year-old taxi driver who wore a "barretina", a traditional Catalan red cap.
"Now there is no turning back."