With the country in shock after the carnage which saw two men deliberately ploughing vehicles into crowds of pedestrians, Madrid mulled raising the terror alert to the maximum in the world's third tourism destination.
With investigators working round the clock to identify the network behind the bloodshed, police said they were hunting for 22-year-old Younes Abouyaaqoub without confirming reports he was the driver who ploughed a van into pedestrians in Barcelona on Thursday.
Investigators meanwhile were working furiously to unravel the terror cell of at least 12 young men - some of them teenagers - behind the Barcelona rampage and a second ramming attack with a car in the seaside town of Cambrils.
One woman was killed and six other people wounded, with police killing five "suspected terrorists" who were in the car and arresting four others.
More From This Section
The Barcelona attack was claimed by the Islamic State group.
As the hunt for Abouyaaqoub gathers pace, Spanish police tipped off their French counterparts about a white van linked to the attacks that may have crossed the border, a French police source told AFP.
Police in Catalonia said three of the suspects shot dead in Cambrils were Moroccan nationals, identifying them as Moussa Oukabir, 17, Said Aallaa, 18, and Mohamed Hychami, 24.
Back in Morocco, their father Said was in shock, with tears in his eyes when he was told of the news while at a wedding, surrounded by relatives.
"We're under shock, completely devastated," he told AFP, saying Moussa had been studying "normally" at school while Driss worked "honestly."
"I hope they will say he's innocent... I don't want to lose my two sons."
Police said they believed the suspects were planning a much larger attack, possibly a vehicle bomb, with the use of gas canisters.
But they appear to have made mistakes, accidentally detonating Wednesday's explosion.
"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.
Both attacks followed the same modus operandi with drivers deliberately targeting pedestrians in the latest in a series of such assaults in Europe.