Street violence escalated in Barcelona late on Wednesday, as protesters set cars on fire and threw acid at police officers in a third night of unrest following the imprisonment this week of nine pro-independence leaders for their roles in the failed 2017 push for regional independence.

Officers from the Catalan force, the Mossos d’Esquadra, were reported to have fired teargas and run over two protesters during clashes that quickly spread after a earlier demonstration turned into a series of running battles with police.

Police claimed that projectiles had been fired at helicopters.

Roger Torrent, the speaker of the Catalan parliament, condemned the violence, tweeting: “These actions don’t represent us. We must distance ourselves from violent behaviour.”

Protesters make barricades during a demonstration called by the local Republic Defence Committees (CDR) in Barcelona on Wednesday. Photograph: Lluís Gené/AFP via Getty Images

As television news broadcast footage of blazing barricades and protesters hurling projectiles at riot police, Spain’s prime minister warned that his government will not be provoked into overreacting.

In a televised address, Pedro Sánchez called on the pro-independence Catalan president, Quim Torra, to unequivocally condemn the use of violence.

Referring to the regional government’s unsuccessful attempts to secure independence, Sánchez added: “No leader can camouflage their failure behind curtains of smoke and fire.”

Sánchez said the government would defend Spain’s constitution and peaceful coexistence but would not be tempted into inflaming tensions.

“The state will always guarantee the rights of those who wish to protest their ideas peacefully,” he said.

“But organised violent groups and those who try to break democratic laws will not achieve their aims … The only hope of those violent groups is that we’ll make mistakes and become over-excited and divided. They want us to fall for their provocations and feed a violent spiral.”

Barcelona on Wednesday evening. Photograph: Rafael Marchante/Reuters

The prime minister’s address came as tens of thousands of people gathered in central Barcelona to protest against the supreme court’s verdict. Many threw toilet rolls in the air in a nod to the demonstration’s slogan: “There’s a lot of shit to clear up.”

Protestors were mostly young and seemed ready to confront police. Chanting “oppressors out” and “the streets will alway be ours”, they taunted riot officers and cheered when masked demonstrators set fire to rubbish bins. The mood was angry and not, as politicians claimed, confined to a handful bent on violence.

At a signal from Tsunami Democràtic, the social network that is guiding demonstrators, the crowd dispersed to gather outside the headquarters of a Spanish government department. After confrontations with police they headed back towards the city centre, setting fire to barricades.

Earlier on Wednesday, the nine jailed leaders had issued a joint plea for peaceful protests after the Spanish government warned any further violence would be met with a “firm, proportional and united” response.

The nine called for a huge but peaceful response to their imprisonment.

“All support to mobilisations and massive and peaceful marches,” wrote the nine, who include the former regional vice-president Oriol Junqueras and two influential grassroots leaders, Jordi Sànchez and Jordi Cuixart. “No violence represents us.”

On Tuesday, peaceful demonstrations in Barcelona gave way to running battles with the police, 24 hours after thousands of pro-independence protesters attempted to shut down Barcelona airport, leading to police charges.

The Spanish government said 51 people had been arrested across Catalonia on Monday and Tuesday, and 54 officers from the regional police force and 18 from the national force had been injured.

Sánchez’s caretaker government has already said it could activate article 155 of the constitution, which would allow it to suspend the regional government and assume direct rule of the region.

Sánchez’s rightwing opponents are calling for the government to take a hard line on the latest eruption of the regional independence crisis. Spain is due to hold its fourth general election in as many years on 10 November.

The latest unrest began on Monday after Spain’s supreme court acquitted the nine defendants of the charge of violent rebellion but convicted them variously of sedition, misuse of public funds and disobedience over their parts in the push to secede from Spain.

Junqueras was jailed for 13 years, while Sànchez and Cuixart received nine-year sentences. The six others were given terms of between 10 and a half and 12 years.

Hours after the verdicts were announced, an international arrest warrant was reissued for the former Catalan president Carles Puigdemont, who spearheaded the push for independence.