The suspects, aged 17 and 19, live in the same area of Nice as Mohamed Lahouaiej Bouhlel, the radicalised Tunisian man who drove the truck that killed 86 people in the city on July 14.
Searches failed to find any weapons at their homes. The teenagers have told investigators they had been in contact with Rachid Kassim, a French jihadist based in the areas of Syria and Iraq held by the Islamic State group.
“They admitted they had been planning a violent attack under the influence of Rachid Kassim before abandoning their plans,” a source in the investigation said.
The 17-year-old, who was not on the intelligence services' radar before, has admitted “hating soldiers”, the source said. She was charged on September with associating with terror suspects.
The 19-year-old is known to investigators, having been in contact with another French citizen who recruits IS fighters, Omar Diaby. At the age of 17 she had planned to travel to Syria.
Kassim is emerging as a major concern for French anti-terror investigators after he was found to be in contact on messaging app Telegram with numerous people who have either carried out attacks in France or been arrested on
suspicion of planning terror strikes.
He has appeared in several Telegram videos made in Syria and Iraq urging attacks in France.
Kassim is believed to have inspired an attack this year in which a senior French policeman and his partner were knifed to death and another in which an elderly priest's throat was cut.
Investigators believe he also directed three women suspected of seeking to blow up a car packed with gas cylinders near Notre Dame cathedral in central Paris this month.
More than 200 people have been killed in attacks in France since 2015, including 130 who died in November's Islamic State attacks in Paris. Prime Minister Manuel Valls has warned the threat of a new atrocity remains at a