File photo: Soldiers standing guard in the Chatelet district of Paris. AFP
The attacker lunged at the soldier at the central Chatelet metro station (see below) around 6:30 am (0430 GMT), making reference to Allah, a police source said.
Investigators have opened an anti-terror probe, government spokesman Christophe Castaner said.
Chatelet metro station in Paris, where the incident took place. Google maps.
The soldier quickly brought the man, who, according to a source, was previously unknown to police, under control.
Following the attack on satirical weekly, Charlie Hebdo, 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.
France has been under a state of emergency since November 2015 and has seen a string of attacks on security forces who have been regularly targeted, particularly those guarding key tourist sites, sparking a debate over whether the troops should remain on the streets.
The most recent attack was last month, when a man rammed a car into a group of soldiers in the Paris suburbs, injuring six.
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.
Friday's attack came a day after Interior Minister Gerard Collomb said the Sentinelle operation would “evolve” but ruled out cuts to troop numbers.
“We want to redeploy it to do better against the threat we are facing today,” Collomb said, adding there would be changes to the way the force is organised.
The military has already shifted towards mobile patrols and away from posting troops outside buildings on permanent watch.
Critics argue that the patrols have done little to increase security and that troops are placed at unnecessary risk for an operation largely aimed at reassuring the public.
They also point to the strain it puts on an army that has 10,000 troops active abroad, including 4,000 fighting jihadism in west Africa.