With the 12-person cell dismantled, police were hunting a 22-year-old Moroccan man, Younes Abouyaaqoub, suspected of driving the van used in Barcelona. They warn he could be at large outside Spain.
Investigators believe the terror cell comprised at least 12 men, some of them teenagers. An imam, Abdelbaki Es Satty, 40, is among the suspects, believed to have radicalised youths in Ripoll, a small town at the foot of the Pyrenees, where several suspects -- including Abouyaaqoub -- grew up or lived.
Spanish media said the imam had spent time in prison. El Pais and El Mundo said he had met prisoners linked to the Al-Qaeda-inspired bombing of Madrid trains that killed 191 people in March 2004, the worst terror attack in Europe.
The imam has been missing since Tuesday. On Saturday, police raided his apartment. They have raised the possibility that he died in an explosion Wednesday evening at a house believed to be the suspects' bomb-making factory, where police uncovered a cache of 120 gas canisters.
The suspected jihadists had been preparing bombs for "one or more attacks in Barcelona", regional police chief Josep Lluis Trapero told reporters, revealing that traces of triacetone triperoxide (TATP) -- a homemade explosive that is an IS hallmark -- had also been found.
The suspects accidentally caused an explosion at the house on the eve of Thursday's attack in Barcelona -- an error that likely forced them to modify their plans.
Instead, they used a vehicle to smash into crowds on Barcelona's Las Ramblas boulevard as it was thronged with tourists, killing 13 people and injuring about 100.
Several hours later, a similar attack in the seaside town of Cambrils left one woman dead. Police shot and killed the five attackers in Cambrils, some of whom were wearing fake explosive belts and carrying knives.
The ISIS claimed responsibility for the attacks, believed to be its first in Spain.
'No music, no children, no women'
In the small town of Alcanar, investigators combed the rubble of the house believed to be the suspects' bomb factory, where the gas canisters were uncovered.
A neighbour, 61-year-old French retiree Martine Groby, told AFP that four men "who all speak French" had been in the house next door since April.
"They were very discreet, too discreet. The shutters were closed, there was no music, no children, no women," she recalled.
A cousin said Moussa "loved playing football, having a good time, chatting up girls".
"The last few months, he started to become interested in religion. He used to go to a mosque in Ripoll. Maybe that's where he was brainwashed," the cousin said.
Snipers on rooftops
Three days after the attack that plunged the country into deep grief, locals and tourists turned out in force on Sunday at Barcelona's Sagrada Familia basilica.
King Felipe, Prime Minister Mariano Rajoy and Catalonia's president, Carles Puigdemont, led a 90-minute ceremony commemorating the victims, who came from three dozen countries, some as far afield as Australia, China and Peru.
In the evening, local football heroes FC Barcelona staged a minute's silence at the 99,000-capacity Camp Nou stadium for their first game of the league season, against Seville-based Real Betis.
Barcelona stars including five-time World Player of the Year Lionel Messi wore shirts with "Barcelona" replacing individual names on the back, while their opponents donned shirts with the message "Real Betis with Barcelona".
In Paris, a mass in Notre-Dame Cathedral was attended by the city's mayor, Anne Hidalgo and France's minister of European affairs, Nathalie Loiseau.
The list of individual tragedies lengthened as a seven-year-old British-Australian boy, Julian Cadman, who had been named as missing, was confirmed as being among the 13 killed in Barcelona.
"He was so energetic, funny and cheeky, always bringing a smile to our faces," his family said.
"We are so blessed to have had him in our lives and will remember his smiles and hold his memory dear to our hearts."
(This story has not been edited by NDTV staff and is auto-generated from a syndicated feed.)
Get the latest election news, live updates and election schedule for Lok Sabha Elections 2019 on ndtv.com/elections. Like us on Facebook or follow us on Twitter and Instagram for updates from each of the 543 parliamentary seats for the 2019 Indian general elections.