Eight former ministers of the ousted Catalonian government are in prison, awaiting charges of sedition and rebellion. A European arrest warrant has been issued for the apprehension of former Catalan president, Carles Puigdemont, now holed up in Brussels.

For supporters of the government, such strong-arm tactics in response to Catalonia’s declaration of independence is a necessary defence of the rule of law. For supporters of Catalan independence, it is a mortal attack on democracy. In reality, both sides have reduced democracy and law to hollow shells.

The actions of the Catalan government were contrary to the provisions of the Spanish constitution but the issue cannot be reduced to legal formalism. What is being played out in Catalonia is a confrontation over political legitimacy. Whatever the legal issues, it can only be resolved at a political level.

The problem with the actions of the Catalan government is that they were undemocratic. Polls have consistently shown that only a minority of Catalans support independence; over the past three years, support has remained at 40-45%. A slightly higher percentage, but still a minority, oppose independence. Catalonia is split down the middle.

The action of the Catalan government in declaring independence was, at best, foolish. Its reason – that 90% of voters backed independence in last month’s referendum – ignores that fact that only 43% had been able to, or willing to, take part. The parliamentary vote on independence was pushed through in a late-night session that most of the opposition boycotted. Independence was less about respecting democracy than about political machinations.

Puigdemont, having declared independence, promptly fled to Brussels. Rather than face up to the consequences of his actions or engage in a political debate inside Spain, he simply vacated the arena. He seemed more interested in making high-stakes gestures than in furthering democracy.

But if the actions of the Catalan government are hardly those of politicians respecting democracy, those of the Madrid government are equally unpalatable. From police brutality in response to the referendum, to the imprisoning of democratically elected politicians, Madrid has sought to address the political issues raised by the question of Catalan independence through force and coercion.

While only a minority of Catalans support independence, there is mounting disaffection with rule from Madrid. The numbers backing secession have nearly doubled since 2010. Under a third want to maintain the status quo. It is not just in Catalonia that there exists such disaffection with central government. Harsh austerity policies, soaring unemployment and a sense of mainstream institutions deaf to people’s needs have stoked popular grievances throughout Spain. The irony is that Catalonia is its richest region and anger often takes the form of resentment at “bailing out” the rest of Spain.

Whatever the roots of the anger, it needs to be addressed, which Madrid has failed to do. In imprisoning politicians, Madrid is effectively criminalising political dissent. The “rule of law” has become a cloak for a refusal to engage in a political debate in socially fragmented Spain. Democracy and the rule of law depend upon political legitimacy. That is what neither side possesses.