Soldiers patrol the Promenade des Anglais in Nice, France, on Tuesday. (Claude Paris/AP)

The man who plowed a truck into a crowd during Bastille Day celebrations in the Riviera city of Nice last week — killing at least 84 and injuring more than 300 — plotted his attack for months and had accomplices, the Paris prosecutor announced Thursday.

Speaking to reporters here in the French capital, François Molins said an analysis of the attacker’s cellphone revealed photographs and search histories suggesting that Mohamed Lahouaiej Bouhlel, the 31-year-old Tunisian-born driver of the truck, had contemplated an attack as early as 2015.

Molins also confirmed that five suspects — four men and one woman — have been identified and taken into custody. They will face preliminary terrorism charges over their alleged roles in the July 14 attack.

The suspects are a Tunisian-born man identified as Choukri C., 37; two Franco-Tunisian men, identified as Mohamed Walid G., 40, and Ramzi A., 21; and two Albanians identified as Artan H., 38, and Enkeledgia H., 42. None were known to French intelligence services, although Ramzi A. had been convicted of petty crimes on six occasions from 2013 to 2015.

The Washington Post's Michael Birnbaum reports from Nice, France a day after at least 84 people were killed when Mohamed Lahouaiej Bouhlel, 31, drove a truck into a crowd celebrating Bastille Day. (Michael Birnbaum,Jason Aldag/The Washington Post)

Bouhlel, the Nice attacker, fit a similar profile: Before the massacre, he was unknown to intelligence services but had a criminal record — in his case, for armed assault.

Molins said a considerable number of text messages and calls linked Bouhlel to the suspects. In the aftermath of the January 2015 attack on the satirical publication Charlie Hebdo, for instance, one of the men in the group sent him the following message: “I am not Charlie. . . . I am glad, they brought in Allah’s soldiers to finish the job.”

A previous announcement by the prosecutor’s office revealed that Bouhlel had sought information online about other attacks, such as the recent shooting at an Orlando nightclub and the killing of Dallas police officers.

His computer was said to have contained pictures of Osama bin Laden, coverage of the Charlie Hebbo attack, and what Molins earlier this week described as “pictures of corpses and pictures related to radical Islam.”

In the aftermath of the Nice attack, the Islamic State declared Bouhlel a “soldier” of the militant group’s self-proclaimed caliphate, although French authorities said their investigation has not found any direct links between Bouhlel and the Islamic State.

Thursday’s announcement followed an admission by Interior Minister Bernard Cazeneuve that national police units had not been patrolling the entrance to Nice’s Promenade des Anglais, where the attack occurred, that night. He had previously claimed the opposite.

Georgetown University faculty member Rollie Flynn spent 30 years working with the CIA and identifies the traits of a lone wolf terrorist attack and why they are difficult to police. (Erin Patrick O'Connor/The Washington Post)

Also Thursday, President François Hollande ordered an official inquiry into police practices on the night of the attack. The results are expected next week.

“We will see proof that the preparations were from the start of the required serious standard,” Hollande said, speaking from Ireland. “If there were any shortcomings, they will come to light.”