Daniel Hannan is an MEP for South-East England, and a journalist, author and broadcaster. His most recent book is What Next: How to Get the Best from Brexit.

When Spain’s military uprising began in 1936, the Republican prime minister, Santiago Casares Quiroga, made a desperate telephone call to the Nationalist leader, Emilio Mola. Spain, he said pleadingly, was about to be plunged into the abyss. Surely, even at this late hour, it was worth trying to find a compromise.

General Mola’s reply was cool, austere and very Spanish. “You have your supporters and I have mine,” he said. “If you and I were to reach a deal, both of us would be betraying our ideals and our men”.

That exchange has come into my head more than once as I have watched the slow and wholly avoidable breakdown in Catalonia. The tiniest quantum of goodwill, of imagination, of generosity would have solved – indeed, might yet solve – the problem. For a long time, Catalan separatists have been privately doubtful of their chances. Referendums tend to go the way of the status quo, and recent election results in Catalonia indicated no majority for a complete break. Most independentistas were content to use the threat of separation to try to win further autonomy within Spain.

Madrid, though, would not countenance such a thing. The use of riot police to disrupt the ballot was only the most recent and dramatic episode in years of legal harassment and prosecutions.

The two sides are now talking past each other. Catalan separatists feel impelled to break away from a Spanish regime that, as they see it, has treated them with contempt and belligerence. Spanish unionists, including in Catalonia, believe they are dealing with opportunistic grievance-mongers who will turn any development into an argument for secession, whatever the law says.

In such a situation, no one pays attention to the would-be compromisers. This article – like everything I have written on the subject – will convince supporters of both sides that I am against them. For what it’s worth, I believe in the right of self-determination, and regard the century-long movement toward more numerous, smaller and more democratic states as a positive development. At the same time, I’m a dyed-in-the-wool Hispanophile. Although I think Catalans have the right to form a new nation, I also think it would be a pity if they felt driven to exercise that right. I had hoped that Madrid would agree to a legal referendum years ago, which would almost certainly have gone against independence. Failing that, it should have ignored rather than disrupted the unofficial ballot. Now, its least bad option is to hold talks on further devolution. As I say, taking this line more or less guarantees the enmity of everyone involved.

“Spain”, wrote the philosopher Unamuno just before the civil war began, “is divided between the Anti-Zedders, who believe X, and the Anti-Exers, who believe Z”. Both sides are at their most animated when fulminating against the other. You rarely hear positive reasons for either a united Spain or a Catalan republic. What you hear, rather, is rage against (take your pick) Franco nostalgists or deceitful traitors.

The solution is so obvious that it barely needs to be adumbrated. A new settlement should be worked out, offering Catalonia – and possibly other regions – greater autonomy within Spain, and containing a mechanism for further constitutional change. That new dispensation should then be put to a referendum. My guess is that most Catalans would settle for more power by agreement rather than holding out for full statehood when no country in the world would recognise them, and when unrecognised independence would necessarily lead to severe economic disruption.

The trouble is that, in the eyes of hardliners in Madrid, such an outcome would throw a lifeline to the rebels. Better, they believe, to assume direct control of the territory and hold fresh elections, perhaps having first outlawed the politicians who backed the independence referendum. Their attitude, naturally, serves to convince Catalan separatists that they have nothing to lose from declaring UDI. Soon, there may be a quarrel over who controls the Catalan police – at which point the crisis will cease to be a political disagreement and become a civil conflict.

It is all, as I say, so needless. Catalonia already has most of the attributes and trappings of nationhood: a government, a parliament, a president, a flag, control of schools and hospitals, an official language. It even has an office that functions as a foreign ministry, with representation overseas. Sure, there is a legitimate discussion to be had over what proportion of taxes should be retained locally but, on both sides, people are now too proud and angry and stiff-necked to have that discussion. Stubbornness. It is Catalonia’s tragedy, and Spain’s – and soon, perhaps, all Europe’s.