Spain has several hundred soldiers in Iraq providing training to local forces in the fight against Isis, but they are not involved in ground operations.
Senior police officials said Thursday’s van attack was linked to an explosion at a nearby home the previous day in which one person was killed. Residents of the house were preparing explosives, a Catalan police source said
Local police also said a man later ran over two police officers at a checkpoint elsewhere in the city, but it was not clear if the incidents were linked. The AAP news agency has said police have confirmed the two events were unconnected.
Security sources told El Pais that Oukabir had recently visited Morocco and arrived back in Barcelona earlier this week.
The horrifying attack took place at around 5pm local time, when the vehicle careered into terrified pedestrians in the busy tree-lined promenade in Las Ramblas, one of the most popular parts of the city, visited by tourists and locals alike.
Police said that neither of the two men arrested had driven the van, though they were involved in some capacity.
Pictures from the scene showed police helping people injured in what was described as a ‘massive crash’.
Harrowing images and video showed numerous bodies strewn across the pavement.
Earlier reports said up to two armed men had fled to a restaurant and taken hostages, but police have since confirmed no suspects are holed up in nearby buildings.
U.S. 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!”
Reports say that a Spanish passport of a man with a Moroccan name was found inside the van.
The area was cordoned off and local metro stations closed, with many people taking shelter in local shops and cafes. Shop owners are thought to have invited passers-by into their premises and then put up shutters to keep those inside safe.
As police continued the hunt, they asked people not to post images or video on social media.
Steve Garrett was in a nearby market and sheltered in a bakery with several others after streams of people ran inside.
One member of the group who took refuge with him said she had heard gunshots after the incident.
Mr Garrett told the BBC: “A very large number of people ran into the market area in a big kind of way, lots of screaming, lots of shouting.
“The security guards immediately responded. We ran into the bakery with four or five other people and ran straight upstairs and hunkered down whilst an enormous wave of people went through the market.
“The lady that was with us said she heard some gunshots.”
Mr Garrett said a “second wave” of people then entered the market, followed by armed police.
He said: “They seemed to sweep through the market area.
“They seemed to be looking for someone. They were going very carefully, very cautiously, stall to stall.”
Eyewitness Ethan Spibey told Sky News: ‘It was real chaos, people started running, screaming. There was a loud bang.’
Another witness, Aamer Anwar, said: “All of a sudden, I just sort of heard a crashing noise and the whole street just started to run, screaming. I saw a woman right next to me screaming for her kids.
“Police were very, very quickly there, police officers with guns, batons, everywhere. Then the whole street started getting pushed back.”
Tom Gueller, who lives on a road adjoining the site of the attack, was forced to flee when the vehicle began hitting pedestrians.
He told the BBC: “I heard screams and a bit of a crash and then I just saw the crowd parting and this van going full pelt down the middle of the Ramblas, and I immediately knew that it was a terrorist attack or something like that.
“I ran away, I mean I live near, I had to run back about 50 metres or so and go up to my flat and obviously see what’s happening on the road from my balcony.”
Asked about the van, he said: “It wasn’t slowing down at all. It was just going straight through the middle of the crowds in the middle of the Ramblas.”
In recent weeks, threatening graffiti against tourists has appeared in Barcelona, which draws at least 11 million visitors a year.
In one video released under the slogan “tourism kills neighbourhoods”, several hooded individuals stopped a tourist bus in Barcelona, slashed the tyres and spray-painted the windscreen.
Since July 2016 a number of vehicles have been driven into crowds in a series of attacks across Europe, killing well over 100 people in Nice, Berlin, London and Stockholm.
Las Ramblas is a popular shopping street in the centre of Barcelona and one of the city’s most popular tourist destinations.
London Mayor Sadiq Khan said that his thoughts were with the victims of the attack.
Prime Minister Theresa May said her thoughts are with the victims of the “terrible attack”, adding: “The UK stands with Spain against terror.”