MADRID (AFP) - Despite its long experience in fighting terrorism, Spain failed this past week to prevent two deadly attacks in Catalonia - a key tourist magnet but also the Spanish region most vulnerable to such assaults, analysts said.
The Islamic State in Iraq and Syria (ISIS) militant group claimed responsibility for the attack, which killed 14 people and left 120 wounded. Vehicles were used to mow down pedestrians in Barcelona on Thursday (Aug 17) and in the nearby seaside resort of Cambrils early Friday.
Spain has five decades of experience of fighting against the Basque separatist group ETA, which killed over 800 people until it declared a ceasefire in 2011.
But it was jolted to another dimension of terrorism in 2004 when it suffered Europe's deadliest terror attack by Muslim extremists.
During the morning rush hour of March 11 that year, bombs packed with nails exploded on four commuter trains heading into Madrid, killing 191 people and injuring nearly 2,000. In the aftermath of the carnage, Madrid overhauled its security forces.
It bolstered its police and intelligence services with new hires, recruited translators and reinforced its cooperation with neighbouring France and Morocco, said terrorism expert Mikel Buesa, from the Complutense University in Madrid.
The authorities also started routinely detaining suspects as a preventive measure, he added.
Additionally, "self-indoctrination" over the Internet with the intent of carrying out an attack became a crime in 2015, easing the process of such early detentions.
Although some lawyers say the measure does not always respect human rights, it has been credited with helping to spare Spain from the terror attacks that have plagued its European neighbours.
The country, with 5,000km of coastline and long sunshine hours, has also succeeded in attracting tourists shunning turbulent destinations like Tunisia or Egypt.
- 'Centre of jihadist activity' -
But the jihadist threat has risen since 2016, when Islamist websites named as a target "Al Andalus" - the name of Spanish territories governed until 1492 by Muslims who were known as Moors.
And experts are particularly worried about the concentration of jihadists in Catalonia, home to the biggest community of Muslims in Spain.
Muslims number 1.9 million in the country of 47 million inhabitants, or about 4 percent of the population, according to the Union of Islamic Communities of Spain.
Most of them are North Africans, with Moroccans topping the list.
As many are new arrivals, there has until now been less risk of radicalisation than elsewhere in Europe, where disenfranchised second- or third-generation immigrants have sometimes turned to extremist ideology, said prosecutor and anti-terror specialist Javier Zaragoza.
Relatively few have left Spain to join extremist groups like ISIS, with only 214 leaving to fight along militants in Iraq or Syria, said analyst Carola Garcia-Calvo from the Real Instituto Elcano think-tank.
That is just a small fraction of the more than 1,000 people who have quit France for extremist ranks since 2012.
But the think-tank also warned that "the metropolitan region of Barcelona is the home of Islamic terrorism in Spain".
"Our last analysis, published in early August, shows that 25 per cent of people detained in relation to Muslim terrorism come from the Barcelona province," Garcia-Calvo said.
Geographically, that is "the main centre of jihadist activity".
- A troubling history -
In fact, Catalonia has seen a long history of Islamic militant activity.
Spain's first Muslim extremist - a member of the Algerian Armed Islamic Group (GIA) - was uncovered in the state in 1995.
Mohammed Atta, the pilot who slammed a passenger plane into one of New York's World Trade Center towers on Sept 11, 2001, spent time in Catalonia shortly before the attacks.
And in 2008, a plot targeting Barcelona's underground trains was foiled when it was already in advanced stages.
The Vanguardia newspaper, quoting security sources, claimed last year that Catalonia was fertile ground for Salafist prayer halls, with 50 in the region at the last count.
The state is also now home to a significant number of second-generation immigrants.
Among them is the group of youths believed to have carried out this past week's deadly attacks.
Most were children of Moroccan immigrants who had grown up in Ripoll, a town at the foot of the Pyrenees mountains.
The town is frequented by tourists, and its unemployment rate is not particularly high, while neighbours described the suspects as hardworking and serious boys.
But police warn that it may have been a case of rapid radicalisation, with the suspects turning to extremism in just a few months.
For the security forces, that is the biggest headache because unlike returnees from the Middle Eastern war zones, such potential terrorists are difficult to detect.