PARIS — The truck driver who killed 84 people on a Nice beachfront had accomplices and appears to have been plotting his attack for months, the Paris prosecutor said Thursday, citing cryptic phone messages, more than 1,000 calls and video of the attack scene on the phone of one of five people facing terror-linked charges.

Prosecutor Francois Molins said the five suspects in custody face preliminary terrorism charges for their alleged roles in helping Mohamed Bouhlel, 31, in the July 14 attack in the southern French city.

Molins' office, which oversees terrorism investigations, opened a judicial inquiry Thursday into a battery of charges against the suspects, including complicity to murder and possessing weapons tied to a terrorist enterprise.

The suspects are four men — two Franco-Tunisians, a Tunisian and an Albanian — and one woman of dual French-Albanian nationality, Molins said.

Bouhlel was a Tunisian who had been living in Nice for several years.

People close to Bouhlel said he had shown no signs of radicalization until recently. But Molins said information from Bouhlel's phone showed searches that suggested he could have been preparing an attack as far back as 2015.

The Islamic State, also known as ISIS, has claimed responsibility for the attack, though authorities have said they had not found signs that the group directed it.

The probe, which involves more than 400 investigators, confirms the attack was premeditated, the prosecutor said.

Telephone contents were used to link the five to Bouhlel, and allegedly to support roles in the carnage. Bouhlel was killed by police after barreling his 19-ton truck down Nice's Promenade des Anglais for more than a mile.

Bouhlel and a French-Tunisian with no previous convictions had phoned each other 1,218 times in a year, Molins said.

Four days earlier, the prosecutor said, a text message from the same man found on a phone seized at Bouhlel's said: “I'm not Charlie; I'm happy. They have brought in the soldiers of Allah.”

The message was dated three days after the January 2015 massacre at Charlie Hebdo, the satirical publication, and the worldwide movement of solidarity for the victims and France, “I'm Charlie.”

Hours after the Nice attack, the same man filmed the scene on the promenade.

The aftermath of the Nice attack has seen France being torn apart, with finger-pointing and accusations that security was wanting despite the state of emergency that has been in place since the Paris attacks Nov. 13 that left 130 dead.

Earlier, French officials defended the government's security measures in Nice, even as the interior minister acknowledged that national police were not, as he had claimed before, stationed at the entrance to the closed-off boulevard during the attack.