ISIL said on Saturday it had carried out the attack in the Spanish seaside resort of Cambrils that killed one person and wounded six.
The extremist group had already claimed responsibility for an earlier attack in Barcelona which killed 13 people.
Eight hours after the Barcelona attack on Thursday afternoon, an Audi A3 car rammed into pedestrians in Cambrils, 120 kilometres down the coast.
Police killed the five attackers, some of whom were wearing explosive belts.
Six civilians and a police officer were wounded in the attack and one woman later died of her wounds.
ISIL's latest claim came as police in Spain stepped up the search for a man believed to be the driver of the van that ploughed into crowds on Las Ramblas in Barcelona on Thursday.
Younes Abouyaaqoub, 22, who was born in Morocco, was not one of the five shot dead by Catalonian police during the second attack in Cambrils.
Key suspect Moussa Oukabir, 17, who was alleged to have rented the van used in the Las Ramblas attack, was confirmed to be one of the suspects killed in Cambrils.
Oukabir had previously been thought to be the van driver but this theory was discredited by police on Friday night.
Abouyaaqoub, who had been living in the Spanish town of Ripoll, has been reported by Spanish media as being a key member of the terror cell.
Police said that of the 12 people they were investigating, Abouyaaqoub was the only suspect not to have been killed or detained.
Earlier on Friday, authorities said the terror cell behind the twin terror attack on Spain had been plotting a larger and more sophisticated attack but were derailed by an explosion at their bomb-making factory.
The group used vehicles to mow down pedestrians and diners in two separate locations on Thursday but police believe they had been plotting gas or explosives attacks until an accidental explosion disrupted their plans on Wednesday.
One person died after exploding gas canisters destroyed a house in Alcazar, some 200 kilometres south of Barcelona, where the plotters were allegedly preparing their weapons. Catalan Police Chief Josep Lluis Trapero said the actual attacks were comparatively rudimentary.
Spanish media previously named the van driver in the Barcelona attack as Oukabir, whose brother Driss Oukabir was detained after his documents were used to rent the vehicle that wove down Las Ramblas, mowing down tourists and stalls.
Following the attack, the driver put on a cap and fled the scene, leaving behind a trail of dead, wounded and debris over several hundred metres. "We had local police on the scene, but we were unable to shoot him, as the Ramblas were packed with people," said Catalonia's Interior Minister Joaquim Forn.
Hours later, the attack took place in Cambrils. In that assault, a single officer shot four of the five attackers who were believed to be wearing explosive belts. They turned out to be well-designed fakes, according to the authorities.
Officials say the two attacks were linked but it was not clear if the same people carried them out.
Police announced a fourth arrest on Friday over the twin attacks, three in their 20s and one in their 30s. Three of them are Moroccans and a fourth from Spain.
Driss Oukabir handed himself in to police in Ripoll, 100 kilometres north of Barcelona, on Thursday after police published his photo. He reportedly claimed that his brother had stolen his documents.
Eight people were suspected to have been part of a cell behind the Barcelona attack, Catalonia Interior Minister Joaquim Forn told local radio on Friday.
"The priority right now is work out the identity of these people, to prove and show the relationship between the different people involved, those that took the van and those that have been able to escape," Mr Forn said.
Witnesses to the van attack said the white vehicle had zigzagged at high speed down Las Ramblas, ramming pedestrians and cyclists, sending some hurtling through the air and leaving bodies strewn in its wake.
Mobile phone footage showed several bodies strewn along the Ramblas, some motionless. Paramedics and bystanders bent over them, treating them and trying to comfort those still conscious.
Around them, the boulevard was deserted, covered in rubbish and abandoned objects including hats, flip-flops and a pram.
The injured and dead came from 34 different countries, the Catalan government said on Friday in a statement, ranging from France and Germany to Pakistan and the Philippines.
The first of the dead victims was named on Friday as Bruno Gulotta, 35. The injured included a five-year-old Irish boy whose leg was broken. Belgium's foreign minister said a Belgian was among the dead on Las Ramblas.
In its claim of responsibility, ISIL's Amaq news agency said: "The perpetrators of the Barcelona attack are soldiers of ISIL and carried out the operation in response to calls for targeting coalition states" — a reference to a US-led coalition against the militant group.
Spain has several hundred soldiers in Iraq providing training to local forces in the fight against ISIL, but they are not involved in ground operations.
The ISIL claim could not immediately be verified.
If the involvement of ISIL militants is confirmed, it would be the latest in a string of attacks in the past 13 months in which they have used vehicles to bring carnage to the streets of European cities.
Read more: How vehicles became the new weapon of terror
That modus operandi — crude, deadly and very hard to prevent — has killed well over 100 people in Nice, Berlin, London and Stockholm.
British tourist Keith Welling, who arrived in Barcelona on Wednesday with his wife and nine-year-old daughter, said they saw the van drive past them down the avenue and took refuge in a restaurant when panic broke out and the crowd started running.
"People were shouting and we heard a bang and someone cried that it was a gunshot … Me and my family ran into the restaurant along with around 40 other people.
"At first people were going crazy in there, lots of people crying, including a little girl around three years old."
It was the deadliest attack in Spain since March 2004, when Al Qaeda militants placed bombs on commuter trains in Madrid, killing 191 people and wounding more than 1,800.
Spanish prime minister Mariano Rajoy announced three days of official mourning for what he called a "jihadist attack".
The Spanish royal household said on Twitter: “They are murderers, nothing more than criminals who are not going to terrorise us. All of Spain is Barcelona.”
US president Donald Trump said: "The United States condemns the terror attack in Barcelona, Spain, and will do whatever is necessary to help."
He added: "Be tough & strong, we love you!"
Barcelona terror attack: International figures unite in condemnation
Police said the two men detained on Thursday had been arrested in two towns, Ripoll and Alcazar, both in the region of Catalonia, of which Barcelona is the capital.
The explosion was also in the town of Alcazar, in the early hours of Thursday.
One person died and another was injured in that incident, police said.
Police said they also shot dead on Thursday a man who had driven a car into a police checkpoint in Barcelona, though they had no evidence he was connected with the van attack.
Barcelona terror attack: Nadal shattered and Muguruza shocked by attack
The attack in Barcelona took place at the height of the tourist season in the city, which is one of Europe's top travel destinations with at least 11 million visitors a year.
Theresa May, Britain’s prime minister expressed a message of solidarity, saying that the UK stands with Spain against terror.
The United States’ Secretary of State Rex Tillerson said his country was committed to tracking down terrorist.
"Terrorists around the world should know that the United States and our allies are resolved to find you and bring you to justice," he said.
While President Donald Trump offered his assistance to authorities in Spain on Twitter.
He tweeted: "The United States condemns the terror attack in Barcelona, Spain, and will do whatever is necessary to help. Be tough & strong, we love you!"
Outside of politics, Spain’s royal court have condemned the incident, calling the perpetrators “murderers” in a statement released on the royal family’s official Twitter account.
The message- translated into English- read: “They are murderers, just criminals who will not terrify us. All Spain is Barcelona. Las Ramblas will be back to everyone.”
King Abdullah II of Jordan also sent a message of condolence via his official social media account.
The Royal Hashemite Court tweeted: “His Majesty King Abdullah II condemns the deadly attack in #Barcelona #Jordan.”