Suspects in Spain's twin terror attacks had been planning an even bigger assault than the deadly car rampages they carried out, police said, as distressing details emerged of families torn apart in the horror.
A 35-year-old Italian was among 14 killed, mowed down in front of his wife and young children in Barcelona when a driver rammed his van through crowds on the busy Las Ramblas boulevard on Thursday, before fleeing on foot.
Police said they shot dead five "suspected terrorists" who had knocked pedestrians down in the Catalan seaside resort of Cambrils in a second attack in the early hours of Friday, and arrested four others as Spain reeled from the deadly violence.
Catalonia's regional police identified three of the suspects who were killed as Moroccan nationals.They were Moussa Oukabir, 17, Said Aallaa, 18, and Mohamed Hychami, 24.
Moussa Oukabir, the suspected driver, as well as Said Aallaa, Mohamed Hychami and Younes Abauyaaqoub Source: EFE/Spanish Police
Police said they suspect 12 people of involvement in the attacks: the five who were killed, four who were arrested and three who have been identified but who remain at large.
In what has been a complex, fast-moving investigation, police revealed the suspects had been planning something larger.
Bigger plans
"They were preparing one or several attacks in Barcelona, and an explosion in Alcanar stopped this as they no longer had the material they needed to commit attacks of an even bigger scope," said Josep Lluis Trapero of Catalonia's police.
He was referring to a blast in a house in the town of Alcanar, about 200 kilometres (140 miles) south of Barcelona, Wednesday evening, which police said killed one person.
Initially treated as a random gas blast, police later linked it to the Barcelona assault, believing occupants of the house were preparing an explosive device inside and slipped up. It remains unclear what the target was.
Police removed dozens of gas canisters from the house, according to an AFP photographer at the scene.
Trapero said that after this the suspects quickly went on to commit "more rudimentary" attacks. These involved the vehicles ploughing into pedestrians in Barcelona and Cambrils.
The Cambrils suspects had an axe and knives in the car as well as fake explosive belts stuck to their bodies, said police.
High 'level of coordination'
Both Spanish attacks followed the same modus operandi.
Drivers deliberately targeted pedestrians with their vehicles, the latest in a series of such assaults in Europe.
The Mediterranean resort of Nice in France was particularly hard hit on July 14, 2016, when a man rammed a truck into a crowd, killing 86 people.
Otso Iho of Jane's Terrorism and Insurgency Centre said the Spanish assaults, which stretched out over two different cities, appeared to be "a much higher level of coordination than has been typically present in previous attacks."
It is also believed to be the first time IS has claimed an attack in Spain.
In a poignant moment Friday, Prime Minister Mariano Rajoy, King Felipe VI and the president of Catalonia - where both attacks took place - held a minute of silence in Barcelona. It was followed by the crowd applauding and shouting "not afraid".
But in a sign of the tensions sparked by the attacks, about 20 far-right militants tried to protest at the march. Some held up signs reading "No More Mosques" or "Refugees not welcome anymore".
Scuffles broke out between the far-right militants and the march participants.
Relatives separated
Details started to emerge Friday on the identity of victims, as did tragic stories of families ripped apart.
Witnesses in Barcelona described how the van pushed through the crowd, leaving bodies strewn along the boulevard as people fled for their lives, screaming in panic.
"We were on the city tour bus, we were 20 feet from the accident when it happened," said Alex Luque, a 19-year-old student from New York.
"We heard the van and the impact with people and then we saw people running."
Then just eight hours later attackers struck in the early hours of Friday in Cambrils. An Audi A3 car rammed into pedestrians, injuring six civilians and a police officer. One civilian, a woman, later died of her injuries.
The police shot dead the five attackers. They also said they had arrested four suspects -- three Moroccans and a Spaniard.
There were some three dozen nationalities among the dead and injured, from countries including Algeria, Australia, China, France, Ireland, Peru and Venezuela, according to Spain's civil protection agency.
Families posted messages on Facebook looking for lost relatives including one heartbreaking appeal for a missing seven-year-old boy, Julian Alessandro Cadman.
Memories of Madrid 2004
Spain, the world's third most popular tourism destination, had until now been spared in the recent wave of extremist attacks that have rocked nearby France, Belgium and Germany.
It had even seen a surge in tourists as visitors fled other restive sunshine destinations such as Tunisia and Egypt.
But it is no stranger to jihadists.
In March 2004, it was hit by what is still Europe's deadliest, when bombs on commuter trains in Madrid killed 191 people in an attack claimed by Al Qaeda-inspired extremists.
Spain has also had to deal with a decades-long campaign of violence waged by Basque separatist group ETA, which only declared a ceasefire in 2011.