But the attacks -- including one in Barcelona, in which a van rammed into a crowd and killed 13 people -- come against the backdrop of an increased extremist threat in Spain.

The Catalonia region, and Barcelona in particular, is the country's jihadist hub and has been for some time, experts say, and authorities have made dozens of terror-related arrests and foiled attack plots in recent years.

After a string of attacks in Europe and Tunisia, Spanish officials raised the country's terror threat level in 2014 and then again in 2015. It has sat on the second-highest level, indicating a "high risk" of an attack, ever since.

According to the Jane's Terrorism and Insurgency Centre (JTIC) database, Spanish police have arrested at least 20 suspects connected to ISIS across the country this year so far, 11 of them in Catalonia.

Read More