BARCELONA: Spanish police shot dead five would-be attackers after confronting them early on Friday in a town south of Barcelona where hours earlier a suspected militant drove a van into crowds, killing 13 people and wounding scores of others.
Daesh said the perpetrators had been responding to its call for action by carrying out Thursday's rampage along Barcelona's most famous avenue, which was thronged with tourists enjoying an afternoon stroll at the peak of the summer season.
Bodies, many motionless, were left strewn across the avenue and authorities said the toll of dead, which included several children, could rise, with more than 100 injured.
Hours later in the early hours of Friday, as security forces hunted for the van's driver, police said they killed five suspects in Cambrils, 120 km (75 miles) south along the coast from Barcelona, to thwart a separate attack.
The five men attempted to drive into tourists on the Cambrils seafront, police said. Their car overturned and some of them began stabbing people. Four were shot dead at the scene and the fifth was killed a few hundred meters away, police said.
One civilian - a Spanish woman - was killed in the Cambrils incident while several other civilians and a police officer were injured. Police destroyed explosive belts the men had been wearing, though they turned out to be fake.
Shortly before midnight on Wednesday, the day before the van plowed into the tree-lined walkway of Barcelona's Las Ramblas avenue, one person was killed in an explosion in a house in a separate town southwest of Barcelona, police said.
Police said they had arrested a Moroccan and a man from Spain 's north African enclave of Melilla, though neither was the van driver. He was seen escaping on foot and was still at large. A third man was arrested in the town of Ripoll on Friday.
A judicial source said investigators believed a cell of at least eight people, possibly 12, may have been involved in the Barcelona and Cambrils operations and that it had been planning to use gas canisters.
Later on Friday, residents and tourists returned to Barcelona's famous Las Ramblas promenade where hours earlier a white van had zigzagged at high speed through pedestrians and cyclists, leaving bodies and injured writhing in pain in its wake.
As Spain went into three days of mourning, people laid flowers and lit candles in memory of the victims along the promenade. Prime Minister Mariano Rajoy and Spain 's king Felipe visited Barcelona's main square nearby to observe a minute's silence.
"Those that live here can't believe it, because we live here, we walk here, this is our neighborhood," Sebastiano Palumbo, 47, an Italian architect working in Barcelona, said as he walked his dog. "I think the best thing would be to continue, every day, doing what do."
The injured and dead came from 24 different countries, the Catalan regional government said, ranging from France and Germany to Pakistan and the Philippines. Spanish media said several children were killed.
Daesh's Amaq news agency said the attackers had carried out the operation "in response to calls for targeting coalition states" - a reference to a U.S.-led coalition against the militant group. Spain has several hundred soldiers in Iraq training local forces in the fight against Daesh.
There was no immediate indication though that Daesh had directed or organized the attack, although some of those responsible for similar attacks in Europe have been inspired by the jihadist group.
The militants have staged a string of attacks across Europe in the past 13 months, killing well over 100 people in Nice, Berlin, London and Stockholm.
The Barcelona attack was the deadliest in Spain since March 2004, when militants placed bombs on commuter trains in Madrid, killing 191 people and wounding more than 1,800.