By Tom Parfitt
Lawyers claim the the 19-year-old was knifed twice in the wrist and once in the abdomen during the Islamic month of fasting.
The man, 32, is said to have told police he had heard voices ordering him to “make a sacrifice” to coincide with Ramadan.
He has been sent to a psychiatric hospital and the girl’s wounds are not life-threatening, according to a lawyer in Rennes, France.
The attack is believed to have taken place outside the city’s Lycee Chateaubriand, where the girl studied, at 4pm local time.
The man, who has not been identified, reportedly told officers he was Muslim before handing the blade to them.
Prosecutor Nicolas Jacquet said: “Voices told him that he had to make a sacrifice on the occasion of Ramadan.”
The attack came a day after a jihadist inspired by Islamic State (ISIS) killed a French police commander and his wife in a small town near Paris.
Larossi Abballa, 25, pledged allegiance to ISIS before slaughtering Jean-Baptiste Salvaing, and his spouse, both 42, in Magnanville last night.
French president Francois Hollande responded to the siege, which was streamed online, by admitting France faces a “very large” terror threat.
France is on alert high amid fears ISIS, which killed 130 people in November’s Paris attacks, could target the Euro 2016 football championship.
Abballa referenced the tournament in a disturbing video he streamed on Facebook after stabbing the pair and taking their two-year-old son hostage.
The terrorist said: “The Euros will be a cemetery. You too Hollande, I haven’t forgotten what you said. Us too Hollande, we will also be ruthless.”