The dramatic election in Catalonia on Thursday was supposed to draw a line under months of tension and division across the Spanish region over its future status. Instead it has opened a potentially damaging new division with suggestions that a fresh wave of arrests of Catalan nationalists may be unleashed.

Altogether, 19 of the elected candidates are either in prison, on bail or in exile, and face charges that carry up to 30 years in prison. Now the supreme court judge Pablo Llarena plans to issue writs against a further 11 people linked with the deposed Catalan government for their part in organising October’s referendum and fomenting secessionism.

They include Marta Rovira, acting leader of Esquerra Repúblicana (Republican Left) – its leader, Oriol Junqueras, is in prison – Anna Gabriel and Mireia Boyá of the anti-capitalist CUP party, and Josep Lluís Trapero, former head of the Mossos d’Esquadra police force, who was hailed as a hero for his handling of August’s terrorist attacks.

Even the name of Pep Guardiola, former Barcelona football club coach and now at Manchester City, has appeared in a police report that forms part of the investigation into events leading up to the unilateral declaration of independence on 27 October.

The report describes the huge but peaceful demonstrations organised by Catalan grassroots organisations as “sowing the seeds of hate towards the Spanish state”. At one such gathering, on 11 June, Guardiola read out a manifesto for independence. The report has been passed on to Llarena, who is in charge of the investigation.

Commenting on the legal moves last week, the deposed Catalan president Carles Puigdemont said from his self-imposed exile in Brussels: “I think it’s clear that in Spain there are a number of state prosecutors, judges and state attorneys who are under orders from politicians. The judges are political appointments. This is one of the weaknesses of the Spanish judicial system.”

Puigdemont is not the only one to complain that Madrid is using the law to deal with a political conflict and to call into question the separation of powers between the executive and the judiciary. Certainly the alacrity with which the justice system has responded to the Catalan crisis is in marked contrast to the glacial pace with which it is handling the hundreds of corruption cases involving members of the ruling Popular party.

Facebook Twitter Pinterest Mariano Rajoy: his treatment of the Catalan question as a legal, rather than political, matter has angered nationalists. Photograph: Javier Lizon/EPA

The legal assault on the secessionists began last March when the superior court slapped a two-year ban on the former Catalan president Artur Mas from holding public office for his role in organising the illegal referendum in November 2014. Three members of his cabinet were also banned. They then faced fines of €5.2m (£4.6m), about €2m of which was raised by independence organisations Òmnium Cultural and the Asamblea Nacional Catalana, but Mas has had to offer his home as collateral. The ANC and Òmnium have also had to raise close to €1m in bail for activists and politicians, thus draining their resources and their ability to organise pro-independence rallies and other events.

In September, the late attorney general José Manuel Maza threatened to arrest 712 Catalan mayors who agreed that their facilities could be used in the banned 1 October referendum. They faced charges of perverting the course of justice and misuse of public funds.

The following month Jordi Sánchez and Jordi Cuixart, leaders respectively of the ANC and Òmnium, were held in protective custody on charges of civil disobedience. They are still in prison. A few weeks later eight members of the Catalan government that declared UDI were jailed while Puigdemont and five cabinet ministers fled to Brussels.

I’m in prison for defending Catalonia’s rights. Spain must free us immediately | Jordi Cuixart Read more

Spain’s prime minister, Mariano Rajoy, refers repeatedly to “the rule of law” whenever the Catalan issue is raised and his government denies that it is using the judiciary to do its dirty work. “There is a separation of powers in Spain,” says Pablo Casado, a member of the Popular party communications department. “We live under the rule of law in a state where the judiciary is independent. In a democracy you never have to fear the law.”

Play Video 0:53 Mariano Rajoy requests powers to dismiss Catalan government – video

However, there is plenty of scope for political interference. The 20 members of the General Council of the Judiciary, which appoints most senior judges, are themselves appointed by congress and the senate. Members of the constitutional court that declared the Catalan referendum illegal are also political appointees. In the EU’s 2017 “Justice Scoreboard” Spain came third to last among 28 member states in terms of public perception of judicial independence, above only Slovakia and Bulgaria. Some 58% of Spaniards surveyed rated judicial independence as “very bad” or “fairly bad”.

Although legal experts told the Observer that there is a sound separation of powers, the popular perception is that politicians are using the courts for political ends. “The conflict between Spain and Catalonia is a political conflict and the Spanish government has renounced its political responsibilities and has hidden behind the judicial process,” Argelia Queralt, professor of constitutional law at Barcelona University, said. “But this doesn’t mean they are manipulating the courts, only that they are using the existing legal means. It’s not a problem of a lack of separation of powers, the problem is that the government, instead of using politics, has opted to treat the question as a legal matter.”

Catalan parliament speaker and four members of governing body bailed Read more

A few days before Thursday’s election, Spain’s deputy prime minister, Soraya Sáenz de Santamaría, told a meeting of the Popular party faithful in Girona: “Who has ordered the liquidation of Catalan secessionism? Mariano Rajoy and the Popular party. Who has seen to it that the secessionists don’t have leaders because they’ve been beheaded? Mariano Rajoy and the Popular party.”

Carme Forcadell, the former speaker in the Catalan parliament, who is on €150,000 bail on charges of sedition, rebellion and misuse of public funds, commented: “Thank you for confirming something we all knew, which is that there is no separation of powers in Spain and that it’s the government that tells the courts what to do.”