LYON, France (Reuters) - A French soldier opened fire on Sunday at a man clad in a North African-style robe who was threatening military personnel with a knife in Lyon, police and the public prosecutor said.

The assailant was wounded in the leg in front of the Desgenettes military hospital in the eastern French city.

Lyon’s public prosecutor Nicolas Jacquet said an investigation was underway into “attempted voluntary homicide on persons with a public service mission”.

The man, in a long djellaba robe and carrying a knife, was spotted around 1300 GMT on the hospital grounds but refused to stop when asked to by a military patrol.

“After a summons, a soldier used his weapon, once,” the prosecutor told reporters.

The man was taken to the Edouard Herriot hospital in Lyon, but not in a life-threatening condition.

Home to Europe’s largest Muslim community, French security forces are on alert after a series of attacks by Islamist militants and sympathizers in recent years.