Nice truck attacker Mohamed Lahouaiej-Bouhlel received logistical support for his Bastille Day attack from five suspects who are now in custody, French prosecutor Francois Molins has said.
Mr Molins told a news conference the crime had been planned for months.
He said one of the suspects had filmed the scene of the attack the day after.
All five are facing preliminary terrorism charges for their alleged roles in helping Lahouaiej-Bouhlel, a Tunisian living in Nice.
Four men and one woman aged between 22 and 40 are due to appear in court shortly.
They include an Albanian couple suspected of providing Lahouaiej-Bouhlel with a pistol.
Another of the suspects is a 22-year-old man believed to have received text messages from Lahouaiej-Bouhlel on the night of the attack, discussing the supply of weapons.
Police found a Kalashnikov rifle and ammunition at the man’s home, AFP news agency reports.
Like Lahouaiej-Bouhlel, none of those detained were known to French intelligence prior to the attack.
Mr Molins said information from Lahouaiej-Bouhlel’s phone showed searches and photos that indicated he had been studying an attack since 2015.
The so-called Islamic State group said Lahouaiej-Bouhlel was one of its “soldiers” – but the lorry driver had not been on any French police watch list.
As the Bastille Day crowd enjoyed festivities on Nice’s Promenade des Anglais, Lahouaiej-Bouhlel careered his large white lorry towards them.
READ ALSO: CROWDS BOO MINISTERS AT MEMORIAL IN NICE
Two police officers opened fire when he mounted the kerb, but he simply accelerated and then zigzagged for up to 2km (1.25 miles), leaving a trail of carnage.
Police finally managed to bring the lorry to a halt, raking the driver’s cabin with gunfire and killing Lahouaiej-Bouhlel.
France has extended its state of emergency until the end of January 2017. It gives the police extra powers to carry out searches and to place people under house arrest.
The government has also launched an inquiry into police actions in Nice on 14 July, amid claims that there were too few police to block a lorry that killed 84 people.
Just one local police car was on duty at the point where the lorry careered onto the pedestrian promenade, the daily Liberation reported.
The local police had neither enough time nor firepower to stop the lorry, it said.
That version of events was disputed by Interior Minister Bernard Cazeneuve.
He said Liberation was referring to a separate, local police roadblock that was diverting traffic. The main roadblock at the start of the promenade was manned by six national police officers, who were “the first to confront the deadly lorry”, he said, adding that two police cars of the national police were stationed there.