In the aftermath of Europe's latest terrorist attack, a set of familiar tensions clouded this sunny, vibrant city on Sunday.

Some here insist that Barcelona is a state of mind, a nonstop celebration of the good life where anyone is welcome and anything goes. But then came the almost predictable events of last week. In a scheme that resembled recent assaults in Paris and Brussels, a group of young, local Moroccan Muslim men - some of whom spoke Spanish and Catalan better than Arabic - staged Spain's deadliest attack in more than a decade. Isis later claimed responsibility for their actions.

Suddenly, Barcelona - and the surrounding region of Catalonia - is being put to a test that has faced not just Paris and Brussels, but also Nice, Berlin, Stockholm and London in the past two years. At stake is the place of the region's Muslim community, the largest in Spain.

For now, Barcelona seems to be responding differently than its neighbours, whose reactions to similar violence were often marked by a fierce anti-immigrant and anti-Muslim sentiment that, in some cases, even translated into political traction. With the rise of the once-obscure Marine Le Pen, for instance, some saw the French elections in May as a referendum on Muslims in France. The migration issue also looms large in Germany's elections, slated for next month.

Although there were isolated reports of vigilante violence against Muslims here, Barcelona appears to be generally resisting being drawn into a post-attack culture war. A traditionally left-leaning city where Muslims have lived for centuries, its officials and citizens have mainly chosen to speak out against the potential for the kind of Islamophobic backlash seen elsewhere in Europe.

On Sunday, thousands of local Muslims marched down La Rambla, the scenic, tree-lined boulevard where the first of two coordinated attacks took place. Young and old, men and women, many of whom were veiled, the demonstrators chanted in unison: “I am Muslim! Not a terrorist!” Non-Muslims lined the sidewalks, clapping and crying. Some stepped forward to hug demonstrators as they passed.

At a Sunday news conference on the investigation, Carles Puigdemont, Catalonia's regional president, grew most animated when he spoke in defence of the local Moroccan population. “The Moroccan people are integrated in Catalonia, and they have made important contributions to the community,” he said.

Some, especially in rural Catalonia, might have said otherwise. Home to the largest percentage of Spain's Muslim population - about 25 percent - the region is also the locus of Islamist militant activity in the country. Roughly a quarter of those arrested on suspicion of radicalised tendencies between 2013 and 2016 were arrested in Barcelona and its environs, according to data released by the Real Instituto Elcano, a Madrid-based think-tank.

​Carola García-Calvo, a senior terrorism analyst at Elcano, said that part of the reason was that Barcelona has long been a receiving centre for immigrants and one of the few places in Spain where the vulnerable generation of second-generation immigrant youths has matured in a concentrated mass.

On Friday, less than 24 hours after the Las Ramblas attack, a small group of demonstrators from the far-right Falange movement - named for a fascist group active in 1930s Spain - protested what they called the “Islamicisation of Europe.”

But that was far from a widespread sentiment. Thousands of counter-protesters ultimately turned out in response, drowning out the handful of rightists and forcing them to disband.

In recent days, a number of Muslim citizens of Barcelona said they had not experienced major discrimination before or after the attacks last week, although many emphasised that their experiences did not mean there is no Islamophobia in Spain.

Chaima Jalili, 23, is from Morocco, in the same demographic as the ring of suspects. She came to Barcelona three years ago to study design, she said.

“Actually, Barcelona has been great to me,” she said. “I've been to France and Germany, and I've never felt more safe and secure.” Every morning before going out, she said, she puts on her scarf. “I've never been scared.”

Asked about Islamophobia, she said: “I have never experienced any of that.”

Naoufal, 22, a young Moroccan waiter in a trendy cafe in the city's Nadal district, said he felt a subtle change in the way he was perceived after the attack. He felt he had drawn heavy scrutiny because of the way he looked.

“They see you in a car with a Moroccan face, and the police tell you to stop. Yesterday I left work, and they stopped me like four times, from here to my house,” he said, emphasising that it was just a short distance away.

Sana Ullah Gondal, 51, from Pakistan, owns a computer supply store here. He said that his 15 years in Spain have been marked by a notable absence of prejudice.

“There are drunk and drugged people who sometimes speak badly,” he said, in an interview in his shop. “But normal people don't say anything.”

Vahangir Alam Ali Segum, 52, owns the Turin Supermarket. Born in Bangladesh, he has lived in Barcelona for 26 years and says he has never experienced Islamophobia, either.

“I've only had problems with thieves, and then I call the police,” he said. “I live better than in my country - Spain is very quiet.”

“I go to my house. We pray in the mosque. It's a normal life,” he said. “This store is over 15 years old, and almost the whole neighbourhood knows me, and I know them. We live as brothers, as family members.”

Barcelona Attack Show all 30 1 /30 Barcelona Attack Barcelona Attack Police officers patrol on Las Ramblas following yesterday's terrorist attack, on August 18, 2017 in Barcelona, Spain. Thirteen people were killed and dozens injured when a van hit crowds in the Las Ramblas area of Barcelona on Thursday. Spanish police have also killed five suspected terrorists in the town of Cambrils to stop a second terrorist attack Getty Images Barcelona Attack Tourists and locals walk along Las Ramblas following yesterday's terrorist attack, on August 18, 2017 in Barcelona, Spain. Thirteen people were killed and dozens injured when a van hit crowds in the Las Ramblas area of Barcelona on Thursday. Spanish police have also killed five suspected terrorists in the town of Cambrils to stop a second terrorist attack. Getty Images Barcelona Attack Police officers patrol on Las Ramblas following yesterday's terrorist attack, on August 18, 2017 in Barcelona, Spain. Thirteen people were killed and dozens injured when a van hit crowds in the Las Ramblas area of Barcelona on Thursday. Spanish police have also killed five suspected terrorists in the town of Cambrils to stop a second terrorist attack. Getty Images Barcelona Attack People leave a fastfood with hands up as asked by policemen after a van ploughed into the crowd, killing two persons and injuring several others on the Rambla in Barcelona on August 17, 2017. A driver deliberately rammed a van into a crowd on Barcelona's most popular street on August 17, 2017 killing at least two people before fleeing to a nearby bar, police said. Officers in Spain's second-largest city said the ramming on Las Ramblas was a "terrorist attack" and a police source said one suspect had left the scene and was "holed up in a bar". The police source said they were hunting for a total of two suspects AFP/Getty Barcelona Attack Police officers tell members of the public to leave the scene in a street in Barcelona, Spain, Thursday, Aug. 17, 2017. Police in the northern Spanish city of Barcelona say a white van has jumped the sidewalk in the city's historic Las Ramblas district, injuring several people. AP Barcelona Attack Injured people react after a van crashed into pedestrians in Las Ramblas, downtown Barcelona, Spain, 17 August 2017. According to initial reports a van crashed into a crowd in Barcelona's famous Placa Catalunya square at Las Ramblas area injuring several. Local media report the van driver ran away, metro and train stations were closed. The number of people injured and the reasons behind the incident are not yet known. Official sources have not confirmed that the incident is a terrorist attack. EPA Barcelona Attack People flee the scene in Barcelona, Spain, Thursday, Aug. 17, 2017 after a white van jumped the sidewalk in the historic Las Ramblas district, crashing into a summer crowd of residents and tourists and injuring several people, police said. (AP Photo/Giannis Papanikos) AP Barcelona Attack People are pictured inside Systemaction, a locked down store after a van crashed into crowds on Las Ramblas in Barcelona, Spain, August 17, 2017. Courtesy Abbie Yermus/Handout via REUTERS ATTENTION EDITORS - THIS IMAGE WAS PROVIDED BY A THIRD PARTY. REUTERS Barcelona Attack People take shelter inside a shop in Barcelona, Spain, Thursday, Aug. 17, 2017. A white van jumped up onto a sidewalk and sped down a pedestrian zone Thursday in Barcelona's historic Las Ramblas district, swerving from side to side as it plowed into tourists and residents. Police said 13 people were killed and more than 50 wounded in what they called a terror attack. (AP Photo/Manu Fernandez) AP Barcelona Attack People move from the scene after a van crashed into pedestrians near the Las Ramblas avenue Reuters Barcelona Attack A policeman stands next to an ambulance after a van ploughed into the crowd, injuring several persons on the Rambla in Barcelona AFP/Getty Images Barcelona Attack People are evacuated from a street after a van crashed into pedestrians near the Las Ramblas avenue in central Barcelona, Spain, August 17, 2017. REUTERS/Stringer NO RESALES. NO ARCHIVE. Reuters Barcelona Attack Firefighters stands outside an evacuated mall after a van ploughed into the crowd, injuring several persons on the Rambla in Barcelona AFP/Getty Images Barcelona Attack Policemen stand next to vehicles in a cordoned off area after a van ploughed into the crowd, injuring several persons on the Rambla in Barcelona AFP/Getty Images Barcelona Attack Plain-clothes policemen phone as they walk past police cars in a cordoned off area after a van ploughed into the crowd, injuring several persons on the Rambla in Barcelona AFP/Getty Images Barcelona Attack A policemen and a medical staff member stand past police cars and an ambulance in a cordoned off area after a van ploughed into the crowd, injuring several persons on the Rambla in Barcelona AFP/Getty Images Barcelona Attack A person is stretched out of a mall by medical staff members in a cordoned off area after a van ploughed into the crowd, injuring several persons on the Rambla in Barcelona on August 17, 2017. Police in Barcelona said they were dealing with a "terrorist attack" after a vehicle ploughed into a crowd of pedestrians on the city's famous Las Ramblas boulevard on August 17, 2017. Police were clearing the area after the incident, which has left a number of people injured. AFP/Getty Images Barcelona Attack Children, some in tears, are escorted down a road in Barcelona, Spain, Thursday, Aug. 17, 2017. Police in Barcelona say a white van has mounted a sidewalk, struck several people in the city's Las Ramblas district. AP Barcelona Attack Mossos d'Esquadra Police officers and emergency service workers move an injured man, after a van crashes into pedestrians in Las Ramblas, downtown Barcelona, Spain, 17 August 2017. According to initial reports a van crashed into a crowd in Barcelona's famous Placa Catalunya square at Las Ramblas area injuring several. Local media report the van driver ran away, metro and train stations were closed. The number of people injured and the reasons behind the incident are not yet known. Official sources have not confirmed that the incident is a terrorist attack. EPA Barcelona Attack Mossos d'Esquadra Police officers attend injured people after a van crashed into pedestrians in Las Ramblas, downtown Barcelona, Spain, 17 August 2017. According to initial reports a van crashed into a crowd in Barcelona's famous Placa Catalunya square at Las Ramblas area injuring several. Local media report the van driver ran away, metro and train stations were closed. The number of people injured and the reasons behind the incident are not yet known. Official sources have not confirmed that the incident is a terrorist attack. EPA Barcelona Attack Injured people react after a van crashed into pedestrians in Las Ramblas, downtown Barcelona, Spain, 17 August 2017. According to initial reports a van crashed into a crowd in Barcelona's famous Placa Catalunya square at Las Ramblas area injuring several. Local media report the van driver ran away, metro and train stations were closed. The number of people injured and the reasons behind the incident are not yet known. Official sources have not confirmed that the incident is a terrorist attack. EPA Barcelona Attack A police officer cordon off a street in Barcelona, Spain, Thursday, Aug. 17, 2017. Police in the northern Spanish city of Barcelona say a white van has jumped the sidewalk in the city's historic Las Ramblas district, injuring several people. AP Barcelona Attack TOPSHOT - Policemen check the area after towing away the van which ploughed into the crowd, killing at least 13 people and injuring around 100 others on the Rambla in Barcelona, on August 18, 2017. A driver deliberately rammed a van into a crowd on Barcelona's most popular street on August 17, 2017 killing at least 13 people before fleeing to a nearby bar, police said. Officers in Spain's second-largest city said the ramming on Las Ramblas was a "terrorist attack". The driver of a van that mowed into a packed street in Barcelona is still on the run, Spanish police said. / AFP PHOTO / Josep LAGOJOSEP LAGO/AFP/Getty Images AFP/Getty Images Barcelona Attack TOPSHOT - Armed policemen stand in a cordoned off area after a van ploughed into the crowd, injuring several persons on the Rambla in Barcelona on August 17, 2017. Police in Barcelona said they were dealing with a "terrorist attack" after a vehicle ploughed into a crowd of pedestrians on the city's famous Las Ramblas boulevard on August 17, 2017. Police were clearing the area after the incident, which has left a number of people injured. / AFP PHOTO / Josep LAGOJOSEP LAGO/AFP/Getty Images AFP/Getty Barcelona Attack A man displays flowers at the Canaletas fountain on the Rambla boulevard on August 18, 2017, a day after a van ploughed into the crowd, killing 13 persons and injuring over 100 on the Rambla in Barcelona. Drivers have ploughed on August 17, 2017 into pedestrians in two quick-succession, separate attacks in Barcelona and another popular Spanish seaside city, leaving 13 people dead and injuring more than 100 others. In the first incident, which was claimed by the Islamic State group, a white van sped into a street packed full of tourists in central Barcelona on Thursday afternoon, knocking people out of the way and killing 13 in a scene of chaos and horror. Some eight hours later in Cambrils, a city 120 kilometres south of Barcelona, an Audi A3 car rammed into pedestrians, injuring six civilians -- one of them critical -- and a police officer, authorities said. / AFP PHOTO / Josep LAGOJOSEP LAGO/AFP/Getty Images AFP/Getty Images Barcelona Attack TOPSHOT - The van who ploughed into the crowd, killing at least 13 people and injuring around 100 others is towed away from the Rambla in Barcelona on August 18, 2017. A driver deliberately rammed a van into a crowd on Barcelona's most popular street on August 17, 2017 killing at least 13 people before fleeing to a nearby bar, police said. Officers in Spain's second-largest city said the ramming on Las Ramblas was a "terrorist attack". The driver of a van that mowed into a packed street in Barcelona is still on the run, Spanish police said. / AFP PHOTO / Josep LAGOJOSEP LAGO/AFP/Getty Images AFP/Getty Barcelona Attack TOPSHOT - Forensic policemen arrive in the cordoned off area after a van ploughed into the crowd, killing 13 persons and injuring over 80 on the Rambla in Barcelona on August 17, 2017. A driver deliberately rammed a van into a crowd on Barcelona's most popular street on August 17, 2017 killing at least 13 people before fleeing to a nearby bar, police said. Officers in Spain's second-largest city said the ramming on Las Ramblas was a "terrorist attack". / AFP PHOTO / Josep LAGOJOSEP LAGO/AFP/Getty Images AFP/Getty Images Barcelona Attack TOPSHOT - A person is helped by Spanish policemen and two men after a van ploughed into the crowd, killing at least 13 people and injuring around 100 others on the Rambla in Barcelona on August 17, 2017. A driver deliberately rammed a van into a crowd on Barcelona's most popular street on August 17, 2017 killing at least 13 people before fleeing to a nearby bar, police said. Officers in Spain's second-largest city said the ramming on Las Ramblas was a "terrorist attack". The driver of a van that mowed into a packed street in Barcelona is still on the run, Spanish police said. / AFP PHOTO / Nicolas CARVALHO OCHOANICOLAS CARVALHO OCHOA/AFP/Getty Images AFP/Getty Images Barcelona Attack TOPSHOT - Policemen accompany clients of a store outside a cordoned off off area after a van ploughed into the crowd, killing 13 persons and injuring over 80 on the Rambla in Barcelona on August 17, 2017. A driver deliberately rammed a van into a crowd on Barcelona's most popular street on August 17, 2017 killing at least 13 people before fleeing to a nearby bar, police said. Officers in Spain's second-largest city said the ramming on Las Ramblas was a "terrorist attack". / AFP PHOTO / LLUIS GENELLUIS GENE/AFP/Getty Images AFP/Getty Images Barcelona Attack TOPSHOT - Forensic policemen arrive in the cordoned off area after a van ploughed into the crowd, killing at least 13 people and injuring around 100 others on the Rambla in Barcelona. A driver deliberately rammed a van into a crowd on Barcelona's most popular street on August 17, 2017 killing at least 13 people before fleeing to a nearby bar, police said. Officers in Spain's second-largest city said the ramming on Las Ramblas was a "terrorist attack". The driver of a van that mowed into a packed street in Barcelona is still on the run, Spanish police said. / AFP PHOTO / PAU BARRENAPAU BARRENA/AFP/Getty Images AFP/Getty Images

At the Muslim march on Sunday, Lourdes Miguel, 50, a lifelong Barcelona resident, stood on La Rambla with her son, watching the Muslim demonstration. She held back tears.

“This shows that they march from the heart,” she said, gesturing at the marchers. “It's not fake.”