A year ago, analysts were expressing confidence during a major conference in London that southern Europe would avoid the kind of large-scale Islamic terror attacks seen in northern European cities like Paris and Brussels.
At a conference at King's College, London, to explore the jihadist threat to Europe, analysts drawn from across the continent highlighted the fact that neither Spain — nor Italy, for that matter, which has also been on the receiving end of vocal Islamic State threats — had seen many volunteers join IS to fight in Syria or Iraq.
They noted neither southern European country has large populations of second-generation Muslim migrants, the most common recruitment pool for IS and rival al-Qaida. And they expressed confidence in the Spanish intelligence services skills, emphasizing the counterterror expertise honed during years of combating violent Basque separatists.
The midweek attack in Barcelona, the worst act of jihadist terrorism in Spain since 2004, when bombers struck commuter trains in Madrid, killing 192 people, is being seen as a wake-up call for the intelligence services — not only of Spain but also of Italy, the one major European country that has so far not suffered a jihadist act of terror.
Recent terror attacks
Counterterror officials in Madrid and Rome say they are perturbed by the increasing number of recent terror attacks across Europe that feature links to North African jihadists. They say they worry about the sophistication of Thursday's attack — even though the plotters failed to pull off a much larger planned onslaught.
Fourteen people were killed in the midweek terror attacks in Spain — 13 in Barcelona and one in the resort town of Cambrils, where a car was driven into a crowd of pedestrians before police shot and killed the five suspects after they left the vehicle.
So far, four men have been arrested as countrywide, anti-terror operations remain underway and police hunt for the driver of the van that rammed pedestrians on Barcelona's historic avenue, Las Ramblas.
Olivier Guitta, managing director of GlobalStrat, a security and geopolitical risk consultancy, said the attack in Spain was different from recent truck attacks in Nice, France, and Berlin, arguing it was "a much more sophisticated plot involving many more people, which is extremely serious and extremely concerning."
Investigations into the backgrounds of the assailants — all but one are of Moroccan descent — are focusing initially on whether any of those involved were fighters who had returned to Europe from Syria, say Spanish counterterror officials, who asked not to be identified by name.
But beyond that, they and their counterparts elsewhere in Europe see an emerging trend of North African links behind the recent spate of terror attacks.
The suicide bombing earlier this year at a Manchester concert was mounted by British-born Salman Abedi, whose parents are Libyan. He traveled frequently to Tripoli to visit relatives and may have had terrorist training there.
Two of the three London Bridge attackers in June were also from North Africa. Rachid Redouane claimed variously to be Libyan or Moroccan, and Youssef Zaghba was born in Morocco.
It was a Tunisian, whose asylum application had been declined, who drove a truck into a crowded Christmas market in Berlin in December, an act of terrorism that left 12 dead.
Spanish detectives are also following links with North African-origin jihadists in Belgium.
Last April, Spanish counterterror police mounted 12 house searches and arrested four suspects in connection with the jihadist attacks at the airport in Brussels and on a metro station, which left 32 dead in March 2016. Some of the suspects arrived in Belgium six days before those attacks and left shortly afterward.
El Pais newspaper reported that during their stay, they had several telephone conversations with people involved in the attacks. All of them were of Moroccan origin.
"The Belgian judge who is investigating the attack on the Brussels airport found links between those responsible for the attack and Moroccans residing in Catalonia," according to a Spanish official.
Catalan police chief Josep Lluís Trapero said shortly after the arrests that the suspects who were detained all had criminal records, including links to drug and arms trafficking. A Spanish official told VOA several of the Barcelona suspects also have criminal histories.
On Saturday, Italian authorities announced they had deported three people — two Moroccans and a Syrian — suspected of extremist sympathies, raising to 202 the number of suspected jihadists expelled from Italy since January 2015. One of the deportees, a 38-year-old Moroccan, was radicalized while in jail for minor crimes, Italian officials said.
The other Moroccan, a 31-year-old man, expressed his support for IS openly. He had been receiving compulsory treatment for a mental disorder after being arrested for theft.