Catalonia police spokesman Josep Lluis Trapero added that a driver who mowed down crowds of pedestrians in the first attack in a busy Barcelona street Thursday could be among five suspects later shot dead in a nearby city.
"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," he told reporters.
Trapero said that after this, the suspects -- who formed part of a cell -- allegedly went on to commit "more rudimentary" attacks.
These involved vehicles ploughing into pedestrians in Barcelona and then again in the seaside city of Cambrils some eight hours later.
At least 14 people were killed and some 100 others were injured.
Police shot dead five "alleged terrorists" in Cambrils, but not before they had injured seven people, one of whom later died of her wounds.
Asked if the van driver in the first attack was among the five killed, Trapero said "the investigation points in this direction". But while there were "clues" that this was the case there was no "concrete proof", he added.
Three out of the five suspects shot dead have been identified, he added, without giving further details.
So far, authorities have arrested four suspects, including three Moroccans and a Spaniard, none of whom had a criminal record related to "terrorism", police said.
(Except for the headline, this story has not been edited by NDTV staff and is published from a syndicated feed.)