A man with known psychiatric problems stabbed a 19-year-old girl three times in western France on Tuesday, telling police he had heard voices ordering him to make a "sacrifice" for Ramadan, the Rennes prosecutor said.

The attack in Rennes came a day after a jihadist killed a French police couple in a small town near Paris, in a stabbing inspired by the Islamic State group.

"Voices told him that he had to make a sacrifice on the occasion of Ramadan," the holy Muslim fasting month that began on June 6, prosecutor Nicolas Jacquet told AFP.