A protester wearing an Estelada or Catalan independence mask stands in front police, not seen, moments before clashes in Barcelona, Saturday, Oct. 26, 2019. The clash comes after 350,000 people protested peacefully Saturday against the imprisonment of nine Catalan separatist leaders for their roles in an illegal 2017 secession bid. (AP Photo/Bernat Armangue)

BARCELONA, Spain (AP) — Police and violent protesters in Spain's restive Catalonia region clashed Saturday after a massive rally in Barcelona against the imprisonment of nine separatist leaders for their roles in an illegal 2017 secession bid.

The flare-up in violence came after a week of tense calm without major incidents following six days when Catalonia was rocked by riots each night after the Oct. 14 Supreme Court verdict that found 12 Catalan leaders guilty of sedition and other crimes. That outbreak led to 500 people, nearly half of them police, being injured and around 200 arrests.

Hundreds of mostly masked youths surrounded the National Police headquarters in downtown Barcelona and threw colorful plastic balls at the officers on guard. When they switched to raining down rocks and bottles, national police with backup from Catalonia's regional police force charged with batons swinging and fired foam bullets. After a chaotic moment they managed to extend a perimeter while protesters set fire to trash cans in the middle of the streets.

Regional emergency services said 15 people were being treated for injuries as a result of the clashes, including an AP photographer who was hit in the face with a police baton. Catalonia's regional police said one of its officers was serious hurt. At least one person had to be put on a stretcher by medics and taken away in an ambulance.

Unlike the worst of the last week's riots that lasted hours, order was restored relatively quickly.

Earlier on Saturday Barcelona's police said 350,000 people rallied peacefully in the regional capital, many waving pro-independence flags for Catalonia. The rally was organized by the main pro-secession grassroots groups who want to create a new state in the northeastern corner of Spain. There were no repeated incidents in the rally that drew families from across the wealthy region.

"We cannot accept that (the prisoners) have been condemned to terms of nine to 13 years for defending the self-determination of Catalans," the president of the pro-secession grassroots group ANC, Elisenda Paluzie, said at the peaceful protest.

Nine Catalan officials were given sentences of nine to 13 years for sedition by the Supreme Court. Four of those were also convicted of misuse of public funds. The other three were fined for disobedience. They were all acquitted of the more serious crime of rebellion, which carries sentences of up to 25 years. Spain's most right-wing politicians called the verdict soft.

Spain's government has told Catalonia's separatists that the national Parliament would need to amend the Constitution, which considers the nation indivisible, to make secession by a region legal.

The largest pro-Spanish union grassroots group Catalan Civil Society has called for a rally in Barcelona on Sunday. About roughly one half of Catalonia's 7.5 residents oppose severing century-old ties with the rest of the country.

The Catalan crisis is set to be a key issue in Spain's Nov. 10 national election, where Socialist Prime Minister Pedro Sánchez will try to stay in power.

Also on Saturday, Spain's far-right party Vox drew several thousand people to a political rally in central Madrid. Vox is trying to profile itself as the best option to stop the rupture of Spain.

Catalan police officers clash with Catalan pro-independence protesters during a demonstration in Barcelona, Spain, Saturday, Oct. 26, 2019. Protests turned violent last week after Spain's Supreme Court convicted 12 separatist leaders of illegally promoting the wealthy Catalonia region's independence and sentenced nine of them to prison. (AP Photo/Emilio Morenatti)
Police take position during clashes with protesters in Barcelona, Saturday, Oct. 26, 2019. The clash comes after 350,000 people protested peacefully Saturday against the imprisonment of nine Catalan separatist leaders for their roles in an illegal 2017 secession bid. (AP Photo/Felipe Dana)
A Catalan pro-independence protester kicks a Catalan Police officer during clashes following a demonstration in Barcelona, Spain, Saturday, Oct. 26, 2019. Protests turned violent last week after Spain's Supreme Court convicted 12 separatist leaders of illegally promoting the wealthy Catalonia region's independence and sentenced nine of them to prison. (AP Photo/Emilio Morenatti)
A Catalan police officer clashes with a Catalan pro-independence protester in Barcelona, Spain, Saturday, Oct. 26, 2019. Protests turned violent last week after Spain's Supreme Court convicted 12 separatist leaders of illegally promoting the wealthy Catalonia region's independence and sentenced nine of them to prison. (AP Photo/Emilio Morenatti)
Catalan police officers clash with Catalan pro-independence protesters during a demonstration in Barcelona, Spain, Saturday, Oct. 26, 2019. Protests turned violent last week after Spain's Supreme Court convicted 12 separatist leaders of illegally promoting the wealthy Catalonia region's independence and sentenced nine of them to prison. (AP Photo/Emilio Morenatti)
A Catalan police officer aims his weapon against demonstrators during clashes in Barcelona, Spain, Saturday, Oct. 26, 2019. Protests turned violent last week after Spain's Supreme Court convicted 12 separatist leaders of illegally promoting the wealthy Catalonia region's independence and sentenced nine of them to prison. (AP Photo/Emilio Morenatti)
A Catalan pro-independence protester kicks a Catalan Police officer during clashes following a demonstration in Barcelona, Spain, Saturday, Oct. 26, 2019. Protests turned violent last week after Spain's Supreme Court convicted 12 separatist leaders of illegally promoting the wealthy Catalonia region's independence and sentenced nine of them to prison. (AP Photo/Emilio Morenatti)
A woman shouts to police officers during clashes in Barcelona, Saturday, Oct. 26, 2019. The clash comes after 350,000 people protested peacefully Saturday against the imprisonment of nine Catalan separatist leaders for their roles in an illegal 2017 secession bid. (AP Photo/Bernat Armangue)
National police are hit by plastic balls thrown by demonstrators during a demonstration in Barcelona, Spain, Saturday, Oct. 26, 2019. Protests turned violent last week after Spain's Supreme Court convicted 12 separatist leaders of illegally promoting the wealthy Catalonia region's independence and sentenced nine of them to prison. (AP Photo/Emilio Morenatti)
Catalan pro-independence protesters march during a demonstration in Barcelona, Spain, Saturday, Oct. 26, 2019. Protests turned violent last week after Spain's Supreme Court convicted 12 separatist leaders of illegally promoting the wealthy Catalonia region's independence and sentenced nine of them to prison. (AP Photo/Emilio Morenatti)
Catalan pro-independence protesters gather during a demonstration in Barcelona, Spain, Saturday, Oct. 26, 2019. Protests turned violent last week after Spain's Supreme Court convicted 12 separatist leaders of illegally promoting the wealthy Catalonia region's independence and sentenced nine of them to prison. (AP Photo/Emilio Morenatti)
Catalan pro-independence protesters gather during a demonstration in Barcelona, Spain, Saturday, Oct. 26, 2019. Protests turned violent last week after Spain's Supreme Court convicted 12 separatist leaders of illegally promoting the wealthy Catalonia region's independence and sentenced nine of them to prison. (AP Photo/Felipe Dana)
Catalan pro-independence protesters gather during a demonstration in Barcelona, Spain, Saturday, Oct. 26, 2019. Protests turned violent last week after Spain's Supreme Court convicted 12 separatist leaders of illegally promoting the wealthy Catalonia region's independence and sentenced nine of them to prison. (AP Photo/Emilio Morenatti)
A Catalan pro-independence protester pauses to eat a sandwich during a demonstration in Barcelona, Spain, Saturday, Oct. 26, 2019. Protests turned violent last week after Spain's Supreme Court convicted 12 separatist leaders of illegally promoting the wealthy Catalonia region's independence and sentenced nine of them to prison. (AP Photo/Felipe Dana)
Catalan pro-independence protesters gather during a demonstration in Barcelona, Spain, Saturday, Oct. 26, 2019. Protests turned violent last week after Spain's Supreme Court convicted 12 separatist leaders of illegally promoting the wealthy Catalonia region's independence and sentenced nine of them to prison. (AP Photo/Felipe Dana)
Catalan pro-independence protesters gather during a demonstration in Barcelona, Spain, Saturday, Oct. 26, 2019. Protests turned violent last week after Spain's Supreme Court convicted 12 separatist leaders of illegally promoting the wealthy Catalonia region's independence and sentenced nine of them to prison. (AP Photo/Emilio Morenatti)
Catalan pro-independence protesters gather during a demonstration in Barcelona, Spain, Saturday, Oct. 26, 2019. Protests turned violent last week after Spain's Supreme Court convicted 12 separatist leaders of illegally promoting the wealthy Catalonia region's independence and sentenced nine of them to prison. (AP Photo/Emilio Morenatti)
A woman takes a selfie as others wave Spanisg flags during a rally to promote 'Spanish Unity' in Madrid, Spain, Saturday, Oct. 26, 2019. The VOX rally comes 2 days after the exhumation and reburial of Spanish dictator Gen. Francisco Franco from the grandiose Valley of the Fallen mausoleum outside Madrid to their new resting place at the Mingorrubio cemetery, 57 kilometers (35 miles) away. (AP Photo/Paul White)
People with Spanish flags gather for a rally to promote 'Spanish Unity' during a rally by the right wing VOX party in Madrid, Spain, Saturday, Oct. 26, 2019. The VOX rally comes 2 days after the exhumation and reburial of Spanish dictator Gen. Francisco Franco from the grandiose Valley of the Fallen mausoleum outside Madrid to their new resting place at the Mingorrubio cemetery, 57 kilometers (35 miles) away. (AP Photo/Paul White)
A big Spanish flag flutters as other wave smaller Spanish flags during for a rally to promote 'Spanish Unity' during a rally by the right wing VOX party in Madrid, Spain, Saturday, Oct. 26, 2019. The VOX rally comes 2 days after the exhumation and reburial of Spanish dictator Gen. Francisco Franco from the grandiose Valley of the Fallen mausoleum outside Madrid to their new resting place at the Mingorrubio cemetery, 57 kilometers (35 miles) away. (AP Photo/Paul White)
A woman with a Spanish flag covering her head listens to speeches in a rally to promote 'Spanish Unity' during a rally by the right wing VOX party in Madrid, Spain, Saturday, Oct. 26, 2019. The VOX rally comes 2 days after the exhumation and reburial of Spanish dictator Gen. Francisco Franco from the grandiose Valley of the Fallen mausoleum outside Madrid to their new resting place at the Mingorrubio cemetery, 57 kilometers (35 miles) away. (AP Photo/Paul White)