Hundreds of thousands of Catalans in Barcelona have marked their national day - the "Diada" - in support of an independence referendum.
The city's streets were a mass of red and yellow flags three weeks ahead of the planned vote - which the Spanish government has deemed illegal.
Catalonia's pro-independence government has passed a law to secede from Spain if the vote is Yes.
Opinion polls suggest the vote, if it takes place, will be very close.
With their own language and customs, Catalans already have much autonomy.
But there is a widespread feeling in the region - one of Spain's richest - that too much of its tax revenue goes to Madrid.
Estimates of the numbers taking part in Monday's protest varied - organisers said it was more than one million people, but Spanish government officials quoted by local media said it was much lower than that.
Spain's economic woes since the 2008 financial crisis - including chronic unemployment - have fuelled the pro-independence mood in Catalonia.
In recent days Spain's Guardia Civil police have raided several Catalan printing shops suspected of preparing material for the referendum.
The crowd in central Barcelona swelled as Catalans of all ages descended on the city. Nearly 2,000 buses were chartered to bring people to the rally.
The city's police, the Guàrdia Urbana, tweeted on Monday evening that "around a million people have participated".
Those who gathered in Barcelona - many sporting T-shirts in the national colours - were hopeful the vote would go ahead, despite Spain's Constitutional Court placing a legal block on the independence referendum.
A majority of Catalans want the vote to go ahead, polls suggest, to settle the thorny issue of independence.
"We are in the 21st century and this constitution which says that the referendum is illegal is from 40 years ago: times change," Laura Alberch, 25, told news agency AFP.
Anna Comellas, 20, said: "Time passes and people become more and more aware that remaining in Spain harms us."
The 11 September Diada marks the fall of Barcelona in the War of Spanish Succession in 1714 - a defeat for Catalan forces.
The left-wing mayor of Barcelona, Ada Colau, cautiously backs the referendum, but has asked the Catalan parliament for guarantees to make the vote as inclusive as possible.
In November 2014, Catalonia held an unofficial "consultation" on independence - and some 80% of those who voted backed it.
But turnout then was relatively low and the vote was non-binding, as the Constitutional Court had ruled it illegal.