Five suspects have been formally charged over the truck terror attack in the French riveria city of Nice that killed 84 people, the Paris prosecutor said on Thursday.
Mohamed Lahouaiej Bouhlel, who mowed down a crowd enjoying Bastille Day fireworks display, had long plotted the carnage, prosecutor Francois Molins said.
The revelations come as the French government continues to be plagued by questions over possible security failings, prompting authorities to launch an investigation into potential oversights.
Molins said photos on Bouhlel's phone showed he had likely already staked out the same July 14 event in 2015.
It also emerged that one of the five suspects in custody, a Tunisian named Mohamed Oualid G, had filmed the scene the day after the carnage, as it crawled with paramedics and journalists.
The five were brought before anti-terrorism judges late Thursday and charged.
They are 22-year-old Franco-Tunisian Ramzi A, 37-year-old Tunisian Chokri C, 40-year-old Tunisian Mohamed Oualid G, 38-year-old Albanian Artan H, and his wife Enkeledja Z who holds both French and Albanian nationality.
None were known to intelligence services, and only Ramzi A, who was born in Nice, had a criminal record, for robbery and drug offences.
He led police to a Kalashnikov and a bag of ammunition on Thursday, however the purpose of the weapons was unclear.
Ramzi, Chokri and Oualid were charged with being accomplices to murder by a terror group.
Ramzi and the Albanian couple faced a second charge, of breaking the law on firearms in relation to a terrorist crime. They are accused of providing Bouhlel with the gun he fired at police officers before he was shot dead.
More than 400 investigators have been poring over evidence since the attack, the third in France in 18 months, and it was analysis of Bouhlel's telephone records that led them to the five suspects.
While the Islamic State group claimed the attack, describing Bouhlel as a "soldier", investigators have not found direct proof of his allegiance to the jihadists.
Many people interviewed by investigators described the Tunisian 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.
However initial details of the investigation revealed Bouhlel had been fascinated with jihad for a while.
In May last year, he took a photo of an article about the drug Captagon, an amphetamine used by jihadists in Syria.
'I am not Charlie'
In July 2015 he took photos of the crowd at the Bastille Day fireworks display, as well as another crowd watching a concert on Nice's Promenade Des Anglais three days later.
In April this year, Chokri C sent Bouhlel a Facebook message reading: "Load the truck with 2,000 tonnes of iron... release the brakes my friend and I will watch".
Investigators also found a text message in Bouhlel's phone from Mohamed Oualid in January 2015, roughly a year after attacks on the Charlie Hebdo satirical 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."
Analyses of Bouhlel's computer and cellphone showed a wide range of images and internet searches showing a fascination with violence and jihadist movements such as al-Qaeda and IS.
His family and friends have described him as violent and possibly suffering from mental illness.
Former FBI profiler Mary Ellen O'Toole said the majority of his reported character traits are "only seen collectively in someone who is psychopathic".
"This is probably one of the most callous crimes you and I have ever heard of, it's very cold-blooded and it's predatory," she said.
State of emergency extended
French President Francois Hollande on Thursday promised "truth and transparency" from an inquiry into allegations of lax security.
"When there is a tragedy, or in this case an attack with many dead... there will naturally be questions," Hollande said during a visit to Dublin, adding that the conclusions of the police probe would be announced next week.
On Thursday, parliament finalised the adoption of a bill extending the emergency laws for a fourth time, after it was toughened up by the rightwing-dominated Senate.
The final version bans gatherings where sufficient security cannot be provided and makes it easier to shut places of worship where preachers incite hate or violence.
Since November the authorities have had emergency powers to carry out searches by day or night and place people under house arrest.