The suspects in the attacks in Barcelona and Cambrils were planning one or more bigger attacks than those that were carried out, police say.
Catalonia’s police chief said blasts in a town south of Barcelona on Wednesday deprived the plotters of bomb material, forcing them to carry out simpler attacks using vehicles to ram crowds.
Police are seeking Moussa Oukabir, thought to be 17, suspected of carrying out Thursday’s Barcelona attack.
Thirteen people died in Las Ramblas.
Scores of others were injured as a van driver zig-zagged along the famous tourist street.
Moussa Oukabir is suspected of using his brother’s documents to rent the van that mowed down people on the famous boulevard.
Hours later, police killed five suspected jihadists in a second vehicle attack in the town of Cambrils. A woman injured in that attack died later.
Police said the men killed in Cambrils were linked to the Barcelona attack, which the Islamic State (IS) group said it had carried out.
Spanish Prime Minister Mariano Rajoy condemned what he called a “jihadist attack” in Barcelona. He has announced three days of national mourning and a minute’s silence was held at noon (10:00 GMT) on Friday.