Since the Paris attacks soldiers have been helping police to protect Jewish community buildings
A man with a knife has attacked three soldiers patrolling outside a Jewish community centre in Nice, in the south of France.
Two soldiers were lightly wounded. The assailant was arrested, police say.
The attack happened in central Nice. Two people who were with the assailant fled the scene, reports say.
France has been on high alert since last month's terror attacks in the Paris region by three Islamist gunmen, in which 17 were killed.
One soldier was hurt in one arm, the other in the face in Tuesday's attack, an official at Nice city hall said.
Two police officers from the city's tram service and another man managed to arrest the assailant, who reportedly had two knives.
The soldiers were guarding a building housing the Nice Israeli Consistory, Radio Shalom and a Jewish association.
The assailant has the Malian surname Coulibaly - the same as that of one of the Paris attackers, who killed four people in a Jewish supermarket.