The Catalan crisis presents the EU with an unprecedented conundrum. Spain joined the European project in 1986, and its democratic transition has for decades been hailed as a model. Tensions have not run this high in the country since the 1981 failed military coup, when colonel Antonio Tejero seized the parliament in Madrid at gunpoint. The then king, young Juan Carlos, prevented the nation from entering another dark age by delivering a speech on TV uncompromisingly defending the constitution and identifying the monarchy with the country’s emerging democratic majority.

As Catalonia’s nationalist leadership hurtles towards what may be, in the coming days, a unilateral declaration of independence, the current king, Felipe, also took to the television screens. Can he rally consensus within Spain to prevent a full-on confrontation?

The best option, one would think, would be for the EU to step in. But calls for it to mediate between Madrid and Barcelona have been left unanswered. Not only that, the EU stands accused of complacency in the face of what some Catalan activists describe as state “repression” that carries echoes of the Franco era. Is any of this fair?

Thousands protest and strike over Catalonia referendum violence Read more

The EU’s critics do raise valid points. If the bloc’s founding principles are all about values, how can it stay aloof from this crisis? At a time when the EU wants to reboot its democratic message and convince citizens it can address their grievances, surely this would be a good moment to demonstrate sympathy towards crowds targeted by security forces for wanting to express a political belief at the ballot box.

Then there is the question of double standards. This year EU institutions came out strongly against the governments of Poland and Hungary for their democratic backsliding. The EU commission has even raised the threat of sanctions. Why isn’t any of this being contemplated when it comes to Spain?

Catalonia has become a focal point across Europe, with many framing the confrontation as a case of fundamental rights being crushed by force. The Catalan leadership has wasted no time making that argument, and the images of police violence will only have buoyed its case. Radical left commentators across Europe have been up in arms against Madrid, as if this was a rerun of the Spanish civil war. Interestingly, their indignation has been much more strident than when Venezuela’s dictator cracked down on protesters earlier this year, with dozens killed.

The scenes of police brutality in Barcelona were undoubtedly both a watershed and a scandal. Amnesty International denounced the “disproportionate” use of force, and the UN high commissioner for human rights has called for an impartial investigation. But before Eurosceptics start using Catalonia as another opportunity to lash out at the EU for its passivity and cynicism, a few reminders may be useful.

The EU has long been ill at ease with separatist issues within its member states. It has no mechanism to sort out a dispute of this kind. Article 4.2 of the 2009 Lisbon treaty states that the EU “shall respect” the “essential state functions” of its members, “including territorial integrity” and “maintaining law and order”. The EU has no power over how a member state decides to organise itself or its constituent regions.

Play Video 1:13 King Felipe accuses Catalan authorities of fracturing Spanish solidarity – video

Supporters of Catalan independence may well argue this needs to be fixed, but no one in the EU wants to open a Pandora’s box. The EU will only deal with a case of newly declared independence if that independence results from a negotiated, legally based process. That is not the case in Catalonia, but would have been the case in 2014 if Scotland had voted to secede from the UK.

The Catalan vote was “not legal” and the issue was “an internal matter for Spain”, the EU commission insisted on Monday. Just as it had in the case of Scotland, it also made clear that if the region seceded from Spain, Catalonia would find itself outside the EU, with no automatic way back in. There are clear limits on the EU’s powers of mediation. It’s true that it played a role in addressing the Northern Ireland question (and still does today), but that was only made possible after a peace accord had been reached.

I was Catalan, Spanish and European. But Mariano Rajoy has changed all that | Irene Baqué Read more

This leaves the issue of fundamental rights. On this point, the EU commission statement that “violence can never be an instrument in politics” is, to say the least, timid. The wording steers clear of laying any blame. The Spanish prime minister, Mariano Rajoy, may have been spared a dose of EU wrath because of his party’s link to the centre-right group in the European parliament.

But whatever political calculations are at work, the EU commission lacks the tools to determine whether a government has violated human rights. These are enshrined in the 1950 European convention on human rights, which the European court of human rights is responsible for upholding, and which the Council of Europe also monitors. Perhaps a court case will one day be mounted against the police action in Catalonia, but that will be up to the judges, not to EU institutions in Brussels.

Drawing a comparison with Poland and Hungary is also hazardous. The Hungarian prime minister, Viktor Orbán, and the government in Poland have dismantled democratic checks and balances, curtailed media freedom and put the independence of the judiciary in jeopardy. However dismal the situation in Spain, nothing comparable has been undertaken by Rajoy. It also takes a good deal of twisting of historical facts to equate the Spanish police’s heavy-handed tactics in Barcelona with the repression, systematic arrests and curtailing of individual freedoms under Franco.

The EU has set itself the goal of countering rising illiberalism and nationalism, and it’s struggling

It took a long time for the EU to react to Poland and Hungary’s erosion of the rule of law. As a recent report by the Open Society European Policy Institute points out, EU leaders “are reluctant to criticise one of their peers because they worry about setting a precedent that could one day be used against them”. But the same report stresses that in the end the EU decided to take steps against these governments not simply because they had trampled on democratic practices, but also because their capture of independent state institutions was undermining the implementation of EU law itself. The European club’s integrity was at stake. Spain has not gone down that road.

It is possible the Catalonia crisis will deteriorate to such a point that the EU will need to shed its caution. For the moment it is in a bind and hoping a compromise will emerge. The dramatic scenes in Barcelona have made it look feeble. But the EU is predicated on a rules-based order, and its leaders believe that in an unpredictable world rife with populism it has to hang on to those rules if it is to survive as a bloc. Sticking scrupulously to the law and to treaties means avoiding setting precedents that might lead to an unravelling.

The EU has set itself the goal of countering rising illiberalism and nationalism, and it’s struggling. The Catalan crisis exposes its political limits and its difficulty in making citizens understand how it functions. For Europe, as for Spanish democracy, this is a major test.

• Natalie Nougayrède is a columnist, leader writer and foreign affairs commentator for the Guardian