The suspect, named by the Nice mayor's office as Moussa Coulibaly, 30, attacked a soldier and a comrade who came to his aid on Tuesday as they patrolled near a Jewish community center. They were slightly injured.
Intelligence services had detected the suspect's radicalization in the Yvelines area, west of Paris, Cazeneuve said. They informed the General Directorate of Internal Security, or DGSI.
The notification meant that when the suspect got on a plane to Turkey last month, an alert was raised, and Turkish authorities expelled him, Cazeneuve said.
The DGSI questioned him but was not at that time able to establish any criminal acts in the works or a legal case against him, the minister said.
Days later, while the DGSI was still looking into why he was in Nice, Coulibaly allegedly carried out Tuesday's attack.
The authorities are conducting searches and have taken people into custody as they seek to pin down the suspect's profile, Cazeneuve said.
According to CNN affiliate BFMTV, Coulibaly was from the Paris area, where he was handed prison time and fines between 2006 and 2009 for offenses, including shoplifting, violence and drug abuse.
An official in the Turkish prime ministry told CNN on Tuesday that French intelligence was aware of Coulibaly and had alerted Turkish officials when he flew to Istanbul's Ataturk Airport from Rome on Thursday. He was put on a flight back to Rome that same day, the source said.
The suspect shares the same last name as one of the three terrorists behind last month's deadly attacks in and around Paris.
Officials cannot confirm he's related to Amedy Coulibaly, the man who killed a police officer in the Paris suburb of Montrouge, then took hostages in a kosher grocery in the French capital, a standoff that ended with him and four hostages dead. Coulibaly is a common name for families of Malian descent.
The soldiers attacked were among the French military forces who have been out on the streets around sensitive sites following last month's terror attacks that included the massacre at the offices of satirical magazine Charlie Hebdo.
Philippe Pradal, Nice's deputy head of security, told BFMTV that the assailant initially didn't do much harm because the soldier he attacked had on a bulletproof vest.
"After realizing the inefficiency of his stabs ... he tried to hurt him in the face," Pradal said.
The attacker injured another soldier trying to assist before he was stopped, with help from a passer-by, public transit officers and municipal police.