France's President Emmanuel Macron on Friday condemned "unacceptable" lapses within the judicial system over an 11-year-old girl's likely killing, after it emerged that the main suspect was previously accused of sexually abusing children.

A girl, named in the press only as Lyhanna, went missing on May 29 near the southwestern town of Fleurance after she was last seen getting into a man's car.

After days of combing the countryside, investigators found her body in an abandoned silo in the nearby village of Puycasquier on Thursday.

A DNA test confirmed it was her, but forensic doctors could not yet find the cause of death, a prosecutor said on Friday evening.

A 41-year-old father of two, whose daughter was a school friend of Lyhanna, has been detained as the key suspect.