Truck attacker Mohamed Lahouaiej Bouhlel had long plotted the carnage in the French city of Nice that killed 84 people, with the assistance of five suspects who are now in custody, prosecutor Francois Molins said Thursday.
Here is what we know so far about Bouhlel and his alleged accomplices.
Bouhlel, the attacker
This image obtained by AFP on July 15, 2016 from a French police source shows a reproduction of the residence permit of Mohamed Lahouaiej-Bouhlel
Bouhlel, a 31-year-old Tunisian who had been living in France since 2005, carried out the attack during Bastille Day celebrations on July 14, ramming a truck into a crowd that had been enjoying a fireworks display.
Molins said photos on his phone showed he had likely staked out the event in 2015, and initial details of the investigation reveal he had been fascinated with jihad for some time.
However many people interviewed by investigators described the father of three as "someone who did not practise the Muslim religion, ate pork, drank alcohol, took drugs and had an unbridled sexual activity", Molins said earlier this week.
While the Islamic State group claimed the attack, describing him as a "soldier", investigators have not found direct proof of his allegiance to the jihadists.
On Bastille Day this year, the attacker used a rented truck to carry out the deadly attack on the crowd on the promenade, after apparently monitoring the walkway in the preceding days.
His family and friends have described him as violent and possibly suffering from mental illness.
Bouhlel was shot dead by police during the rampage. Investigators have since managed to track down other suspects through his phone.
With a criminal record for robbery and drug offences, Franco-Tunisian Ramzi A. is the only one of the suspects who was known to investigators prior to the attack.
Born in Nice, he received two text messages from Bouhlel minutes before the carnage began.
In one of the messages, the killer thanks him for a pistol he allegedly gave him the previous night, and mentions five other weapons.
Police found a Kalashnikov and a bag of ammunition as they searched a cellar of one of Ramzi A.'s associates on Wednesday, but what the weapon was intended for was unclear.
Officers also found more than 2,500 euros ($2,750) in cash and 200 grams of cocaine in Ramzi A.'s home.
Artan H. and his wife
Ramzi A. has claimed that an Albanian aged 38, named Artan H., gave him the pistol Bouhlel mentioned in his message.
The Albanian and his wife -- Enkeledja Z., who holds both French and Albanian nationality -- were both taken into custody Sunday.
On April 4 this year, Tunisian Chokri C., aged 37, sent Bouhlel a Facebook message reading: "Load the truck with 2,000 tonnes of iron... release the brakes my friend and I will watch".
Video surveillance placed Chokri, who had no previous police record, with Bouhlel in the truck on the Promenade Des Anglais prior to the attack.
His fingerprints have been found on one of the truck doors.
Mohamed Oualid W., 40
Molins said Bouhlel and Mohamed Oualid W., a 40-year-old French-Tunisian, called each other 1,278 times between July 2015 and July 2016.
Investigators also found a message in Bouhlel's phone from Oualid on January 10 2015 -- roughly a year after attacks on the Charlie Hebdo weekly which spawned the hashtag "I am Charlie" in support of those killed.
The message read: "I am not Charlie ... I am happy they have brought soldiers of Allah to finish the job."
Pictures of Oualid apparently taken in the truck used in the attack were also found on Bouhlel's phone.