Spanish police hunted Friday for the driver who ploughed a van into crowds of pedestrians on a busy avenue in Barcelona, just hours before a second such assault hit a nearby resort, in twin attacks that left 14 dead and over 130 injured.
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.
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.
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.
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, said the attacks were most likely the work of an organised "cell."
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."
Police announced the arrest of four suspects, including a Spaniard and a Moroccan.
Carles Puigdemont, Catalonia's president, warned the suspect still on the run was potentially dangerous, saying "these types of people have already demonstrated they have the will to harm whatever happens."
There were at least 34 nationalities among the dead and injured, who came from countries as varied as France, Venezuela, Australia, Ireland, Peru, Algeria and China, according to Spain's civil protection agency.
At least two Italians were among the dead, according to the foreign ministry in Rome and the employer of one of the victims, while Belgium said one Belgian national died.
"We're united in grief," Rajoy said Thursday in a televised address after rushing to Barcelona, the biggest city in Catalonia, a region in Spain's northeast whose separatist government is defying Madrid with a drive for independence.