THE production was as dramatic as any other the National Theatre in Barcelona has seen. There, on July 4th, the president of Catalonia’s government, Carles Puigdemont, announced plans to hold a unilateral referendum on independence from Spain on October 1st. The draft law he unveiled says that, whatever the turnout, if those voting in favour outnumber those against, within 48 hours the Catalan parliament will declare independence. To Mr Puigdemont’s supporters, this is a national epic. To Mariano Rajoy, Spain’s conservative prime minister, it is “authoritarian delirium”. He is determined that it should not take place.

Mr Puigdemont’s push follows five years of secessionist agitation in Catalonia, one of Spain’s richest regions, whose 7.5m people are 16% of the country’s total. Separatism was fuelled partly by the Constitutional Tribunal’s rejection of parts of a new statute that would have granted the region more autonomy. But the main forces were nationalist politicians in Barcelona who blamed euro-crisis austerity on Madrid. In a regional election in 2015, parties campaigning for independence won, but only just: the ruling coalition got 48% of the vote but 53% of the seats in the parliament.

Mr Puigdemont invokes “the legitimate right to self-determination of a thousand-year-old nation”. National and international law is against him. Spain’s constitution of 1978—approved by over 90% of Catalan voters in a referendum—granted the regions great autonomy. But it affirmed “the indissoluble unity of the Spanish nation”. Only the Spanish parliament can change the constitution. Catalonia’s own autonomy statute, which Mr Puigdemont’s law would replace, can only be amended by a two-thirds majority of its parliament. And the Council of Europe, which Mr Puigdemont consulted, said in June that any referendum must be carried out “in full compliance with the constitution”.

Mr Rajoy insists that he must uphold the law. At Madrid’s urging, the courts have fined and suspended from office the Catalan politicians who organised a previous, unofficial referendum in 2014 (in which just 2.3m people voted, a 37% turnout). This time the Catalan government plans to thwart legal action by rushing the referendum law through its parliament, by simple majority, in September. It claims the vote, unlike that of 2014, will be binding.

Soraya Saenz de Santamaría, Spain’s deputy prime minister, responded that “24 hours will be enough” for the state to strike down the referendum law once it is passed. In this, Mr Rajoy has the support of the opposition Socialists. Even Podemos, a far-left party, says that the referendum is not binding. The Catalan government has tried but failed to get international support. Spain’s European partners see Catalonia’s status as a strictly internal matter.

With his threat of a declaration of independence, Mr Puigdemont’s last throw seems to be to provoke an overreaction by Mr Rajoy and a popular rebellion in Catalonia. Article 155 of the constitution lets the government force regional officials to fulfil their legal obligations. Never invoked, it is portrayed in Barcelona as “tanks in the streets”. Rather than Article 155, the government will probably use the courts to block the referendum less dramatically, by slapping lawsuits on those who sign or vote for unconstitutional measures.

Opinion polls show that around 40-44% of Catalans support independence, depending on how the question is framed. That is not enough to make a revolution. The march to illegality is prompting strains in Barcelona. Mr Puigdemont this month sacked Jordi Baiget, a member of his government, for saying that a binding referendum “probably” won’t happen. Mr Baiget said he was prepared to go to prison, but not to expose his family to fines.

Mr Rajoy’s approach may be unimaginative, but it is effective. It is politically profitable for him in the rest of Spain, where many are fed up with what they see as Catalan whining. But it ignores Catalonia’s unhappiness with Spain’s current constitutional arrangements. Keeping the country together may require revisiting them.