Thousands gathered Thursday at the gates of Catalonia's judicial body in Barcelona to demand the release of a dozen officials arrested in connection with a vote on independence that Spanish authorities are challenging as illegal.
The demonstrators answered a call by pro-independence civic groups to stage long-term street protests against the police surprise crackdown one day earlier.
Acting on a judge's orders, police seized 10 million ballot papers and arrested at least 12 people, mostly Catalan government officials, suspected of coordinating the referendum. The arrests were the first involving Catalan officials since the campaign to hold an independence vote began in earnest in 2011.
The Catalan National Assembly, a driving force behind the secession movement, urged people to gather at noon Thursday outside the region's justice tribunal and bring tents if needed.
By midday, the protesting crowds filled a square the size of two soccer fields and erupted in slogans chanting "We will vote!" and "Hello democracy." Many wrapped themselves in the "estelada" flag, which has become a symbol of those in favor of an independent Catalan republic, and some climbed lampposts to get a better view.
"We will be here, peacefully but present, until all of the arrested walk out free," the Assembly's president Jordi Sanchez told the cheering crowds.
The regional police force cordoned off the area, and live video streaming from the ground showed people angrily whistling and jeering at a police officer who became entangled with a protester. There were no immediate reports of other major incidents, but the atmosphere was a mixture of the festive and the tense.
"Our motto is that we are not afraid," said Malena Palau, a 21 year-old student participating in Thursday's gathering. "We want to vote because we have the right to decide, regardless of what we vote."
The protesters' response had begun on Wednesday as news of the police raids on Catalan government offices and the arrests spread through social media. Some people camped out overnight at the gates of the regional department of economy, where civil guard investigators conducted a search and arrested two officials in charge of finances and taxation.
Various vehicles belonging to the Civil Guard force were vandalized and the officers had to be escorted away in the early hours of Thursday by regional police amid some scuffles.
Spain's Prime Minister Mariano Rajoy has warned Catalan leaders of "greater harm" if they don't call off the referendum bid, but the regional government has vowed to go ahead.
Catalonia represents a fifth of Spain's 1.1-trillion-euro ($1.32 trillion) economy and enjoys wide self-government, although key areas such as infrastructure and taxes are in the hands of central authorities.
The region has about 5.5 million eligible voters. Polls consistently show the region's inhabitants favor holding a referendum but are roughly evenly divided over independence from Spain.