Tens of thousands of people protested Tuesday night in Barcelona against the Spanish government's detention of two Catalan separatist leaders.
The demonstrators carried candles and banners demanding the release of Jordi Sanchez and Jordi Cuixart, who are being held on possible sedition charges.
Prosecutors accuse Cuixart of the Omnium Cultural movement and Sanchez of the Catalan National Assembly of provoking violence against police during a pro-independence march last month.
Catalan leaders have called the two political prisoners, which the government denies.
Earlier Tuesday, Spain's top court ruled Catalonia's independence referendum was illegal, saying that regional law backing the vote violated Spain's constitution.
The Catalan government had passed the "self-determination referendum law" on September 6. Spain's high court said the law must be suspended temporarily as it assessed the Spanish government's opposition to it, but Catalonia went ahead with the referendum on October 1.
According to court regulations, the suspension was to last five months while judges come up with a ruling, but the pro-independence coalition ruling Catalonia claimed that the universal right to self-determination outweighs Spain's laws.
Catalonia's government spokesperson, Jordi Turull, told reporters Tuesday Catalonia would not "surrender" its secession bid and reiterated calls for talks with Madrid on what he called "a democratic mandate" for independence.
Spain has given Catalonia until Thursday to reverse any moves it has made to secede or face direct rule from Madrid.
Catalonia, Spain's most prosperous region, is home to 7.5 million people. Its capital, Barcelona, is one of Europe's major tourist attractions. Catalonia has its own language and distinct culture, and is deeply divided over independence.
The Catalan government said that 90 percent of Catalans who participated in the October 1 referendum voted for independence from Spain. Many opponents of independence boycotted the vote, reducing turnout to around 43 percent of eligible voters.