These are tough times for Spanish politicians. The established parties in Madrid are mired in a corruption scandal for which Prime Minister Mariano Rajoy has already been forced to apologise. And now they face a serious challenge ahead of next year’s general election from Podemos, a left-wing grassroots political start-up that was formed only in January, and that already threatens to dismantle many of the country’s political conventions.

Perhaps the biggest headache, however, is Catalonia. After Sunday’s unofficial poll in which more than 1.8m people voted to back independence for the wealthy region in the north east of the country, it is clear that Madrid and Barcelona are on an irretrievable collision course. Its loss seriously threatens the future of Spain.

Of all the Spanish regions, Catalonia carries the largest economic clout, contributing almost 20 per cent of Spain’s overall GDP; it boasts a host of multinational companies; its population is young and entrepreneurial and its rate of unemployment is considerably lower than the rest of the country. On the cultural side, it has its own language and customs, and it is fiercely resistant to changes imposed by Madrid. Emotions are still raw after a 2010 constitution court decision to limit an already agreed transfer of powers.

Watch more

None of this automatically qualifies the region for independence, of course, and critics point to the surge in support for autonomy, especially financial autonomy, since the onset of the credit crisis that swept through much of Europe at the end of the last decade. Spain, with its over-reliance on debt-fuelled building projects, was particularly hard hit. The professional classes in Barcelona and Girona were non-too excited about sharing the burden from their higher incomes.

But now the merits or otherwise of Catalan independence hardly matter. The government in Madrid, by refusing to engage with the Catalans and invoking the high legal principle that even an expression of opinion runs counter to the Spanish constitution, has created a problem from which it cannot easily extract itself.

Rather than engage with Catalans, the government in Madrid has consistently used the constitution as an argument to hide behind. It will now point to the fact that turnout on Sunday was about 33 per cent of the entire population, but this ignores that fact that the poll was in doubt until a few days before it went ahead, and that there were few polling stations.

Yes, the Spanish constitution does render Sunday’s plebiscite invalid – but when support is so strong in favour of change, the failing is perhaps with the constitution, and not with those expressing their opinion.

In Artur Mas, the canny Catalan president, the government in Madrid had a man with whom they might have done business. Even yesterday, he called for greater dialogue with Madrid, rather than immediate elections that would likely usher in a more pro-independence administration in Barcelona.

Mr Mas backed the Yes vote, but is only a relatively recent convert to the idea. Had Madrid been more flexible, taken Catalan arguments more seriously and offered more autonomy to the government in Barcelona – the Basque country already has powers than the Catalans enjoy – the guns of the independence movement might have been spiked, and those supporting it left in the margins.

Madrid, fearful that one of its most important sources of income would dry –up decided not to do that and now risks either losing Catalonia altogether, or being forced to cede even greater powers, and finance.

The Catalans face their own problems. Rather breezily - and wrongly - their political leaders say that membership of the EU, Nato and the rest will be a foregone conclusion when independence is secured. They also face huge costs associated with setting up a country; a military, a central bank and diplomatic missions are only at the top of a hugely expensive shopping list.