Baton-wielding riot police charged at violent protesters in Spain's Catalonia region late on Saturday, following a massive, peaceful rally against the imprisonment of nine separatist leaders.

Several thousand pro-independence protesters surrounded the National Police headquarters in downtown Barcelona and threw plastic balls at officers to protest the actions of security forces in recent weeks.

Police dispersed the mostly radical youths when they began hurling rocks, bottles and flares. The Mossos regional police force warned people against approaching the city center, where protesters set up barricades and ignited bonfires. The protest was called by the radical CDR, which favors street action to pressure Madrid.

The violent unrest is the first major incident since Catalonia was rocked by six days of riots when the Supreme Court on October 14 sentenced nine separatist leaders to prison for their role in the illegal 2017 independence referendum.

Earlier Saturday, about 350,000 people waving a sea of Catalonian flags gathered for a peaceful rally in Barcelona in support of calls to free jailed separatist leaders. The rally was organized by the ANC and Omnium Cultural, the region's two biggest grassroots pro-independence groups that eschew violence.

Some 350,000 protesters rallied in support of jailed secessionist leaders

The violent nature of some of the protests has tarnished the image of the pro-independence movement and hardened the stance of the government in Madrid.

More than 600 police officers and civilians have been injured in the protests in Spain's economic powerhouse and tourist hub.

Regional government head Quim Torra has condemned the violence while calling on the government to negotiate on a new referendum, a nonstarter for Madrid as it deems any independence bid illegal.

"We have to be capable of creating a republic of free men and woman ... and overcoming the confrontational dynamic with a constructive one," he told hundreds of Catalan mayors at a ceremony that endorsed a document demanding self-determination.

The showdown between separatists and Madrid has revealed deep divisions both within the Catalonian independence movement over strategy and within the regional population of some 7.5 million.

Polls show 44% of the region's population in favor of independence and 48.3% against.

On Sunday, supporters of unity with Spain will hold a counterrally in Barcelona.

The situation in Catalonia is likely to take center stage in Spanish elections on November 10, the fourth in as many years.

Watch video 02:33 Share Messaging apps mobilize Catalan protesters Send Facebook google+ Whatsapp Tumblr linkedin stumble Digg reddit Newsvine Permalink https://p.dw.com/p/3RaeF Using messaging apps to mobilize Catalan protestors

cw/aw (AFP, AP, EFE, Reuters)

Every evening, DW's editors send out a selection of the day's hard news and quality feature journalism. You can sign up to receive it directly here.