Within hours of the attack in Barcelona, Spanish police had begun investigating Driss Oukabir, a 28-year-old man who was born in Morocco. He is thought to be the first person arrested in connection with the atrocity.
But El Pais newspaper said Oukabir had denied being involved in the attack and told police that his documents had been stolen.
Reports suggested that Oukabir was suspected of hiring the white Fiat van used in the attack from a rental company in a town around 25km (15 miles) from the centre of Barcelona.
According to Oukabir's Facebook page, which was later taken down, he had lived in the French city of Marseilles but moved to the Catalonian town of Ripoll. Police sources said that he has a NIE - the identity card issued to foreigners who live in Spain.
The Spanish newspaper ABC reported that although a warrant had been issued for his arrest over allegations of domestic abuse, police did not suspect him of any jihadi activity. El Pais said he had spent time in prison in Figueres, Catalonia, and had been released in 2012.
Counter-terrorism officers told the paper that he had been in Madrid earlier this year, adding that they were looking into where he had stayed in the Spanish capital and who he had met there. He is believed to have arrived in Barcelona from Morocco on 13 August.
Oukabir’s criminal record states that he was born on January 13th 1989, in the Moroccan town of Aghbala.
Facebook pictures show Oukabir taking a selfie and sitting on a beach. His social media profile reveals a man who likes rap music and the TV series Prison Break, and whose favourite book is the Qur’an.
But it also shows his political views, especially when it came to the treatment of Arabs. In late July, he shared a picture apparently showing an Israeli soldier restraining a keffiyeh-wearing boy. The photo was captioned: “What a pity for Arabs. Even kids can’t save themselves from colonisation.”
A couple of months earlier, he had reportedly shared a video claiming that “the lie of Jewish liberation” was being used to promote Zionism and Jewish supremacy.
Not long after his name and photograph emerged, people began posting furious and obscene messages on his Facebook page.
On Thursday evening, the Catalan regional president, Carles Puigdemont, confirmed that two people had been arrested in connection with the attack, which left 12 people dead and injured at least 80.
The Catalan police force, the Mossos d’Esquadra, said that two of its officers were hit by a car on Thursday as its driver attempted to escape a police roadblock.
Barcelona’s mayor, Ada Colau - who, like Puigdemont cut short her holidays to return to the city - said a minute’s silence would be held for the victims at midday on Friday to show “that we are not scared and we are more united than ever”.
Guardian News and Media