"No tinc por!" — I am not afraid — mourners have been chanting in the local Catalan language at vigils and marches across Barcelona, since ISIS killed 16 people in and around the city on Aug. 17 and 18.

But when Spain's king broke royal protocol and joined marchers last weekend in solidarity with the terror victims, the tone changed: Residents booed and yelled at him to "get out!" and go home to Madrid.

Catalans are using the "No tinc por" slogan — and hashtag — to express defiance not only against terrorists, but also against the Spanish state.

Separatists rule Spain's northeast region of Catalonia, which has its own language, culture, history and holidays. Last month's ISIS attacks hit during a campaign for independence.

So when Spanish Prime Minister Mariano Rajoy arrived in Barcelona several hours after the attacks, he appealed for unity.

"It's important that we're capable of working together — like a true team," he told reporters. "Unity will enable us to wipe out terrorism."

That infuriated many independence activists, who interpreted Rajoy's comments, and the Spanish king's appearance in Barcelona, as challenges to the independence movement — and to regional officials' authority.

"Right after the attack, a lot of people in the independence movement had this feeling that the attack was being used by the Madrid press and politicians as a way of attacking independence," says Liz Castro, an American immigrant to Barcelona and convert to the Catalan independence cause. "There were immediately editorials that said, 'Catalans must give up this silly game of independence, because this is really serious.' "

Catalan leaders say they will not give up. They vow to go ahead with a referendum on Oct. 1 and declare independence from Spain if the "yes" votes win.

Madrid says the whole thing is unconstitutional.

The terror attacks have given Catalan and Spanish politicians one more thing to argue about. They trade barbs daily over which level of government — regional or national — is to blame for failing to detect ISIS militants before it was too late.

In a recent TV interview, when Catalonia's interior minister Joaquim Forn read out the names of the terror victims, he made a distinction between "Catalans" and "Spanish nationals" — as if they are already from two different countries.

Meanwhile, rank-and-file police officers are trying to get to the bottom of how a Muslim imam managed to quickly and quietly radicalize 12 local youth into ISIS attackers.

Inspector Albert Oliva, with the Catalan regional police, called the Mossos, says the regional and national forces have been working well together.

"We've actually had good relations between regional and national police forces," says Oliva. "Within 15 minutes of the attack, we'd set up a coordination center together. So to color the police response with controversies and accusations — that's the unfortunate work of politicians and the media."

Spain has seen this before. Politicians and the media exploited the deadliest Islamist attack in Europe, the 2004 Madrid train bombings, which killed nearly 200 people just days before a national election.

The party favored to win, Rajoy's conservative Popular Party, mistakenly blamed the attacks on Basque separatists. So did most conservative newspapers. The public felt duped, and delivered a surprise victory at the polls to the opposition Socialists.

Copyright 2017 NPR. To see more, visit http://www.npr.org/.