THE Catalan regional government of Carles Puigdemont is preparing to hold a unilateral referendum on seceding from Spain on October 1st, which it says will be legally binding. Catalans will be asked whether they want to form an independent republic. But there is a problem: Spain’s democratic constitution of 1978, which was approved by more than 90% of Catalan voters, gave wide autonomy to the regions but affirmed “the indissoluble unity of the Spanish nation”. Only the Spanish parliament can change the constitution. Mr Puigdemont’s referendum is therefore illegal, and Mariano Rajoy, Spain’s conservative prime minister, is determined to prevent it taking place.

Home to 7.5m people (16% of the total) and accounting for 19% of national GDP, Catalonia is one of Spain’s richer regions. It has formed an integral part of Spain since the 16th century (and of the Kingdom of Aragón before that), but it has its own language and culture. Until recently Catalan nationalists were content with home rule. Two things combined to increase support for independence. First, Spain’s Constitutional Tribunal rejected parts of a new statute that would have given Catalonia more autonomy. More importantly, nationalist politicians in Barcelona succeeded in deflecting against Madrid popular anger at the austerity that followed the bursting of Spain’s housing and financial bubble in 2009. Parties campaigning for independence narrowly won a regional election in 2015. Ranging from bourgeois nationalists to anti-capitalist anarchists, they are united only by the demand for a referendum, which they call “the right to decide”. Earlier this month they rushed through the Catalan parliament one law ordering the referendum and a second requiring, if the Yes vote wins and irrespective of turnout, an immediate unilateral declaration of independence.

The Catalan government’s own pollster finds that while 70% want a referendum on the territory’s future, only 48% do if Spanish government doesn’t agree—which it emphatically does not. According to the same poll, support for independence is slowly declining, and now stands at 41%. Mr Rajoy is relying on the courts to stop the referendum, arguing that the rule of law is fundamental to democracy. The Constitutional Tribunal has suspended the two laws. The Civil Guard arrested 14 senior people, most of them Catalan officials, involved in organising the referendum, and has seized 9.8m ballot slips. Mr Puigdemont insists that the vote will go ahead. He is relying on popular mobilisation: tens of thousands protested against the arrests in Barcelona. But it is hard to see the vote being anything more than an unofficial consultation, similar to one held in 2014. Most supporters of “No” side won’t vote. If anything like the 2.3m alleged to have voted in 2014 were to turn out, Mr Puigdemont would claim victory.

Behind the confrontations lies a deadlock. Mr Puigdemont does not have enough popular or external support to impose independence. But Mr Rajoy’s bet that time and economic recovery would calm Catalonia has proven to be mistaken. A majority of Catalans remain unhappy with the status quo. Their discontent demands a political, rather than merely legal, response. After October 1st, a fresh regional election is likely to follow in Catalonia. And the Spanish government has accepted that it will have to discuss constitutional and other changes to try to anchor Catalonia more firmly in Spain. Dialogue is essential, but in a climate inflamed by confrontation, it will be neither quick nor easy.