Updated

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.

CATALONIA INDEPENDENCE BID: CAN ANY SIDE EMERGE AS WINNER?

Catalan Vice President Oriol Junqueras acknowledged that the crackdown had disrupted the referendum plans. "It's evident that we won't be able to vote like we have done in the past," Junqueras told broadcaster TV3.

Even so, he remained confident there will be a large turnout of Catalans on Oct. 1 — whatever form the vote takes. Pro-independence leaders have insisted the ballot will go ahead despite the obstacles.

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.

SPAIN'S CATALONIA REGION SETS INDEPENDENCE VOTE FOR OCT. 1 DESPITE PROTEST FROM MADRID

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.

MORE THAN 700 MAYORS IN SPAIN COULD FACE ARREST OVER CATALAN INDEPENDENCE VOTE

Spain's Prime Minister Mariano Rajoy has warned Catalan leaders of "greater harm" if they don't call off the referendum bid.

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.