Soldiers opened fire on a man outside a mosque in south-eastern France after he drove a car at them, officials say.
According to the police, the driver injured one of the four soldiers, who were guarding the mosque in Valence.
The driver has been hospitalised after being shot in the arm and leg but his injuries are not life-threatening, the government said.
French security forces remain on high alert following the 13 November attacks in Paris.
The motive for the attack, which occurred between prayer sessions when many people were outside, is not known.
Police say the man drove twice at the soldiers. They shot him when he reversed his car and came at them again after the first attempt, AFP reports.
The driver is said to be 29 years old and from Lyon, an hour away from Valence.
A stray bullet hit an elderly bystander in the calf.
Defence Minister Jean-Yves Le Drian and Interior Minister Bernard Cazeneuve said in a statement that the soldiers had used defensive fire.
The local mayor, Nicolas Daragon, has praised their “remarkable” self-control.
He also told local media that the mosque is “moderate”.
Some 10,000 security personnel remain deployed around France to protect sensitive sites.