Nice truck attacker Mohamed Lahouaiej Bouhlel received logistical support for his Bastille Day attack from five suspects who are now in custody, French prosecutor François Molins has said, reports BBC News.
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 Bouhlel, a Tunisian living in Nice.
The 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 Bouhlel, none of those detained were known to French intelligence prior to the attack.
Mr Molins said information from Bouhlel's phone showed searches and photos that indicated he had been studying an attack since 2015.
The so-called Islamic State group said 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, Bouhlel careered his large white lorry towards them.
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 Libération 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.