Police have raided the flat of an imam who they believe may have radicalised the Barcelona and Cambrils attackers.
Of the 12 people police suspect of involvement in the attacks, five were shot dead by security forces in Cambrils and another four have been arrested, said Josep Lluis Trapero of Catalonia's police during a television interview late Friday.
The Islamic State claimed the eruption of violence via its new agency hours after the first attack on Thursday, though it was not immediately clear what if any links the suspects had to worldwide terror organizations or how large their cell was.
On Thursday, a van plowed into pedestrians on Las Ramblas in Barcelona, killing 13 people and injured 100 others.
Thirteen people were killed and scores injured when a van rammed into a crowd of people in what Spanish police deemed a terrorist attack.
Police believe the attacks are also connected to an explosion in a house in Catalonia Wednesday that killed one person. An explosion in a house in Alcanar earlier on Thursday was first thought to be a gas explosion, but police later found it was a bomb factory being used by the terror suspects.
Suspects in Spain's deadly twin terror attacks were preparing an even bigger assault but were thwarted in their plans and forced to act in a "more rudimentary" way, police said on Friday.
In total, 13 people were killed in Barcelona, while another died in a separate attack in the nearby resort town of Cambrils.
Buckingham Palace, the official London residence of the Queen, shared her message on Friday in which she expressed condolences on behalf of herself and husband to King Felipe VI and Spanish citizens on the loss of lives in the attacks, Efe news reported.
Police say the attacks were planned for some time in Alcanar, and they could have been much worse.
"Today is a day of mourning", Gulotta's company, Tom's Hardware, said in a statement posted to Facebook Friday. A fourth suspect detained in Alcanar yesterday is a Spaniard.
"Kill all infidels and only allow Muslims to continue the religion", Moussa reportedly answered, going on to say the only country he would never live in is "the Vatican".
"At this time of vast grief, I want to offer our solidarity and support to the people of Spain, with whom we have such close relations".
Danish Prime Minister Lars Rasmussen said Europe has "again been attacked by terror".
Australian Foreign Minister Julie Bishop says four Australians were injured in the attack.
"It's not just this one (incident) because there have been other ones, so we have to condemn that and regret all these things that are happening now".