Draped in red, yellow and blue separatist flags - with one banner reading "Goodbye Spain" - they marched through central Barcelona in what many hope will be the last protest before independence.
"If there is huge mobilisation, they can't do anything in Madrid," said Jordi Calatayud, a 21-year-old economics student, referring to the October 1 vote.
"Catalan people will make independence possible; if there are a lot of us, they can't stop us."
Around one million people took part in the event, Barcelona's municipal police said in a Twitter post. A spokeswoman for the central government's representative in the wealthy northeastern region put the turnout lower, at around 350,000 people.
The protest coincides with Catalonia's national day, the "Diada", which marks the fall of Barcelona in the War of the Spanish Succession in 1714 and the region's subsequent loss of institutions and freedoms.
Since 2012 the holiday has been used by separatists to press for an independent state.
"What more do we have to do to make it understood that the people of Catalonia want to vote?" Catalonia's pro-independence president Carles Puigdemont told reporters at the rally.
'Put me in prison'
Those against independence complained that a day meant for all Catalans had been hijacked by separatists - and even more so this year, ahead of the referendum.
Prime Minister Mariano Rajoy, whose conservative government is fiercely against the vote, wished Catalonia "a good day", calling "for a Diada of freedom, cohabitation and respect for all Catalans".
Demonstrators took the shape of a giant "X" by gathering on the Paseo de Gracia and Aragon avenues in central Barcelona, to represent the mark Catalans will make on their ballots during the referendum.
If the "Yes" side wins, Catalonia's regional government has vowed to declare independence within 48 hours and set about building a sovereign state.
With Spain's central government promising to block the referendum, the pro-independence camp was keen to show that it can rally its troops -- especially after participation in the "Diada" declined last year.
"I am too old to be told what I can or can't do, I am counting on voting and I will do so, even if they have to put me in prison," said Mari Carmen Pla, a 70-year-old pensioner surrounded by a sea of red and yellow Catalan independence flags.
Region divided
Rajoy's conservative government has said the vote violates Spain's constitution, which states that only central authorities can call a referendum.
Following a legal challenge from his government, Spain's Constitutional Court suspended a referendum law that was fast-tracked through Catalonia's regional parliament on Wednesday.
Police have searched a Catalan printing house and a local weekly newspaper suspected of making ballots for the referendum, while Spain's state prosecutor has opened criminal proceedings against Puigdemont and other Catalan officials.
Catalan society is deeply divided over independence.
In a survey by the Catalan Centre of Opinion Studies in July, 41.1 percent backed independence while 49.9 percent rejected it. But about 70 percent wanted a referendum, to settle the question once and for all.
Like the referendum held in Britain last year on the country's membership in the European Union, the issue in Catalonia pits rural areas - which are more pro-independence - against large urban centres like Barcelona which are more in favour of remaining in Spain.
Catalonia, roughly the same size as Belgium, has its own language and customs, and already has significant powers over matters such as education and healthcare.
But Spain's economic problems, coupled with a perception that the wealthy northeastern region's 7.5 million people pay more in taxes to Madrid than they get in return, have pushed the independence question to the centre stage.
During the 2013 "Diada" demonstrators formed a human chain that crossed Catalonia.
The following year the demonstration took the shape of a giant "V" for "vote", while in 2015 the march resembled a human arrow.