Rioting raged in Barcelona and throughout the Catalan region for a third straight night Wednesday, as police fought street battles with protesters who are angered by lengthy prison sentences for nine leaders of the wealthy region's drive for independence from Spain. The president of the Catalan region, Quim Torra, called for a halt in the violence, BBC News reports.

"We condemn violence," Quim Torra said. "There is no reason nor justification for burning cars, nor any other vandalism."

Torra, who advocates independence for Catalonia, was speaking after Spanish Prime Minister Pedro Sánchez made a direct appeal to him to condemn the violence, according to BBC News.

Get Breaking News Delivered to Your Inbox

In Barcelona, tens of thousands of protesters faced off against police. Some set up flaming barricades in the streets, torching cars and trash cans. They chanted, "The streets will always be ours!"

Catalan police said protesters threw gasoline bombs, stones, bottles and firecrackers at them.

Demonstrators push the trash bin during protest after a verdict in a trial over a banned Catalonia's independence referendum, near Catalan Interior Ministry in Barcelona, Spain, October 16, 2019. ALBERT GEA / REUTERS

The violence erupted in Catalonia after Spain's Supreme Court on Monday sentenced nine separatist Catalan leaders to up to 13 years in prison for their part in an October 2017 effort to declare independence for the region.

After a surge in separatist sentiment since the global economic crisis hit Spain, around half of Catalonia's 7.5 million residents want to break away from Spain and forge a new European country. The issue has divided families and friends, but demonstrations had largely been peaceful until this week.

Outnumbered police used riot helmets, vests and shields for protection. They fired foam bullets and swung batons to keep away the swarming radicals, most of whom covered their faces. Police also drove armored vans at high speeds to scatter the crowds — but when police succeeded in dispersing one hot spot, another erupted.

One police helicopter was hit by five "pyrotechnic" objects similar to fireworks, according to the regional police force. The rare passers-by or tourists caught in the middle of the melees scurried to safety. Some residents tossed water from balconies down on burning trash bins and debris while firefighters tried to keep up with the emergencies.

Central Barcelona, a leading tourist destination known for its beautiful architecture and relaxed atmosphere, became a no-go territory.

″(This is) shameful. It doesn't represent me," architect Gerard Beltri said. "I think the verdict was very bad, but I think this (violence) is by a minority of the independence movement. The real independence movement is not like this. These people only want to do damage and that's it."

Health services in Catalonia said medics attended to 52 people in the region Wednesday. Police said late Wednesday that they had arrested "at least 20 people" throughout Catalonia for violent acts.

Police officers takes position during protest after a verdict in a trial over a banned Catalonia's independence referendum, near Catalan Interior Ministry in Barcelona, Spain, October 16, 2019. ALBERT GEA / REUTERS

Sánchez said the violent clashes wouldn't provoke him into taking drastic measures in Catalonia, despite calls by rival parties to crack down on the separatist politicians in power in the region.

Sánchez, who is an interim prime minister while awaiting national elections on Nov. 10, consulted with other national political leaders in Madrid during the day about the trouble in Catalonia.

The Spanish government will respond with "firmness, calmness and unity" to the confrontations, Sánchez said in a televised address.

Sánchez blamed "organized groups of extremists" for the rioting, but said he wouldn't be drawn into playing their game of an "ascending spiral of violence."

The protests followed the pattern of previous days as crowds gathered during the day to block roads and hold marches demanding independence. After sunset, marches turned ugly.

Police also reported clashes in Girona, a town near the French border, and other places.

The clashes have injured more than 250 people, including police, over the past three days. On Monday police skirmished for hours to keep protesters from entering the Barcelona airport and shutting it down.

An organization representing Barcelona businesses, called Barcelona Abierta, said the violence had caused "significant losses" and "deeply damaged" its image abroad. Pere Ferrer, director of Catalonia's regional police, said the street violence was "intolerable."

Other protests are scheduled in the coming days as separatists vow no letup in their secession drive.

Most impromptu protesters have responded to an online campaign by Tsunami Democratic, a shadowy grassroots group that uses encrypted messaging apps to call for peaceful disobedience.

Spanish Interior Minister Fernando Grande-Marlaska told Cadena SER radio that authorities were investigating the group and "close to" discovering who is behind it.

On Wednesday, the group issued a statement appealing for an end to the violence.

During a daytime lull in the rioting, thousands of people set off Wednesday on five large peaceful protest marches across Catalonia that aim to converge in Barcelona on Friday.

They included families with children, elderly and young people, carrying banners reading "Libertat Presos Politics" (Freedom for political prisoners) — a reference to the leaders sentenced by the Supreme Court.

Torra, a fervent separatist who critics have called a xenophobe, joined one of the marches, saying he wanted to be next to the people.

After three days of ignoring calls to criticize the street violence in the region he governs, Torra bent to the pressure late Wednesday and called for the unrest to stop.

"I make a call for calm and serenity. We separatists have not been and are not violent," he said in a brief and hurriedly organized televised statement. "This must stop right now."