A knife-wielding man attacked a soldier on patrol in central Paris on Friday but did not cause any injuries, police said.
The attacker lunged at the soldier at the central Chatelet metro station around 6.30 am (0430 GMT), making reference to Allah, a police source said. The soldier quickly brought the man under control.
The attacker was not previously known to police, a source said.
The incident came with France still on high alert following a string of terror attacks which began in January 2015 when jihadist gunmen stormed the offices of satirical weekly Charlie Hebdo, killing 12.
Following that attack, the government launched an operation known as Sentinelle, deploying some 7,000 troops across the country to guard high-risk areas such as tourist sites and religious buildings.
Since then, there has been a string of assaults by individual attackers targeting these soldiers, including at Paris’s Orly airport, sparking a debate over whether the troops should remain on the streets.
French defence minister Florence Parly said the fact that the attacker was swiftly brought under control Friday was “proof of the professionalism and efficiency of the Sentinelle soldiers in their mission to protect”.
“We do not know the intentions of the attacker, who was arrested,” she told Europe 1 radio.