Police said they killed five "suspected terrorists" during the night and three others were arrested as Spain reeled from the double tragedy in Barcelona and in Cambrils, some 120 kilometres (75 miles) south.
But the driver responsible for the carnage in Spain's second largest city remained at large, authorities warned, while police said they believed the two attacks were connected.
Both attacks followed the same modus operandi, with drivers deliberately targeting pedestrians with their vehicles, slamming them to the ground or sending them flying in the latest such assault in Europe where cars and vans have been used as weapons of terror before.
Javier Zaragoza, a prosecutor advising the attorney general in terrorism matters, told AFP the attacks were most likely the work of an organised "cell."
More From This Section
In an additional twist, police said an explosion in a house in another part of Catalonia Wednesday evening was potentially linked to the attacks, believing those inside "were preparing an explosive device."
As world leaders united in condemning the violence, the Islamic State group propaganda agency Amaq claimed one of its "soldiers" carried out the rampage in Barcelona.
In the Barcelona incident, a white van sped down the popular Las Ramblas avenue packed full of tourists yesterday afternoon, knocking people down and killing 13 in a scene of chaos and horror.
Witnesses recounted how the van pushed through the crowd, leaving bodies strewn along the boulevard as other people fled for their lives, screaming in panic in scenes of chaos and confusion.
"We were on the city tour bus, we were 20 feet from the accident when it happened. We heard the van and the impact with people and then we saw people running," said Alex Luque, a 19-year-old student from New York.
"We got separated from my grandparents and I had to take my younger sister to try to find safety," he said today, adding he has since been reunited with his relatives.
Gunfire ensued during which police killed the five attackers.
Markel Artabe, a 20-year-old restaurant worker, said he was on the seaside promenade when he heard what he initially thought were fireworks, but soon realised were gunshots.
He said he saw a person lying on the floor "with a gunshot in the head. His friends were crying out 'help'." Police announced the arrest of three suspects, including a Spaniard and a Moroccan.