(CNN)The tensions laid bare between Catalonia and Spain's federal government over Sunday's referendum have a long and painful history that reaches back to the Franco era and beyond. But never since Spain became a democracy have relations been this polarized, the language so inflammatory.
Catalan independence vote caps four centuries of mistrust
On Sunday night, the Spanish Prime Minister, Mariano Rajoy, accused Catalan secessionists of "indoctrinating children, harassing judges and journalists." Barcelona's mayor tweeted that "a cowardly president filled our city with police."
While Catalans were occupying schools to ensure they could open as polling stations, Spanish flags were suddenly hanging from balconies in faraway Andalucia. Jose Luis Nantunez, a retired jeweler in Cordoba, told CNN that the Catalans were "rancourous traitors, indoctrinated at an early age to become nationalists."
The brief moment of solidarity after the August terror attack in Barcelona, when King Felipe and Rajoy were applauded at a memorial in the Plaza Catalunya, seems a long time ago.
Even then, the sniping resumed within days, with Catalan police complaining that Madrid had deprived them of intelligence from Europol, the pan-European law enforcement agency. The Spanish Interior Minister, Juan Ignacio Zoido, said that such information could only be shared "in an atmosphere of agreement and trust."
Trust has often been in short supply since King Felipe V's army captured Barcelona in 1714, an event still remembered every September 11, Catalonia's national day. As Barcelona became Spain's industrial powerhouse in the early 20th century, separatist sentiment stirred again. It contributed to the outbreak of the Spanish Civil War; General Francisco Franco's planes bombed Barcelona in 1938 and his forces took the city early in 1939.
Barcelona began removing the last plaques from the Franco era this year; street names recalling his rule were changed long ago. But nearly four decades of military dictatorship still provoke a visceral reaction among older Catalans.
Franco banned the use of the Catalan language in public -- yet today it's spoken by at least four million people, and taught as the primary language in every school. Culturally, economically and not least on the football field, Catalans see themselves as a distinct nation. The yellow-and-red striped flag is everywhere.
The seeds of the current crisis were perhaps sown when Spain adopted a democratic constitution in 1978. It devolved powers to the regions precisely as an insurance against a repeat of Franco's overweening central power, while stressing the "indissoluble unity of the Spanish nation."
But Catalan governments always wanted more, and support for outright independence reached a peak during the country's economic crisis from 2008 to 2012.
Catalonia is the economic engine of Spain; its economy is the size of Portugal's. For years it has complained that its revenues are "plundered: by Madrid -- that it pays in some $12 billion more than it receives. Madrid says the gap is much smaller -- a view supported by most economic analysis. Charles Powell, history professor at the Universidad CEU-San Pablo, says the Catalan calculation is "nonsense" but the region receives less investment than its size would warrant.
Some 20 years ago, I spoke with the then mayor of Barcelona, Pasqual Maragall. The city was basking in the glow of a successful Olympic Games, for which it had transformed much of Barcelona's infrastructure. I asked him how relations were with Madrid. There was a shrug. Barcelona saw itself more as a European city, he said.
His reply was a measure of Catalonia's emerging self-confidence. In an era when nationalist movements -- from Scotland to the Baltics and Belgium -- were finding their voice, Catalan politicians felt the tide of history was flowing in their favor.
Barcelona's cosmopolitan self-assurance is often seen elsewhere as arrogance. Powell says that many other Spaniards feel Catalans "have an annoying superiority complex. Catalans love to describe themselves as more 'European' than the rest of Spain."
In Andalucia, one of Spain's poorer provinces, older people recall how they had to travel to Barcelona for work. Powell says Catalonia's economic take-off in the 1960s "was largely possible thanks to the hundreds of thousands of immigrants from poorer parts of Spain (mainly Andalucía, Extremadura and Murcia) who went to work there."
The most ardent expression of the rivalry is on the football field, when the two giants of La Liga, Barcelona and Real Madrid meet. As a former Barcelona FC President Joan Gaspart told writer Sid Lowe: "History has transformed us into something more than a football club: Barcelona is the defense of a country, a language, a culture." And Real Madrid was Franco's team.
On Sunday, in the empty Camp Nou stadium, the scoreboard showed not the goal tally but one word: Democracia. But Barcelona's opponents, Las Palmas, had the Spanish flag embroidered into their shirts for the occasion.
Despite the raw emotions, it would be wrong to see opinion on either side as monolithic. The result of this referendum was distorted by circumstances. Polling suggests that support for Catalan independence has slipped in recent years. In elections two years ago, the pro-independence parties won 48% of the vote.
Elsewhere in Spain (with the exception of the Basque country, which has its own history with Madrid), many Spaniards disapprove of what they see as the central government's heavy-handed tactics and are anxious about the broader fallout. There is a real risk that the minority government in Madrid could collapse.
The leader of the small but expanding centrist party Ciudadanos, Albert Rivera, was born in Barcelona and has a saying: "Catalonia is my homeland, Spain is my country and Europe is our future."
But we are where we are. Powell told CNN the government's "use of force has tarnished its image at home and abroad. It looks incompetent as well as heavy-handed."
As the newspaper El Pais wrote Sunday night, Spain's democracy faces its greatest challenge.