A court heard the 16-year-old continued to pose a serious risk of harm to members of the public as she was sentenced over the death Katie Rough in a playing field in York in January.
A judge told the defendant she must spend a minimum of five years in custody but would only be released when considered safe to do so by the parole board.
A court hearing in July was told Katie died from being smothered by her attacker.
Her killer, aged 15 at the time, was standing in a nearby cul-de-sac, covered in blood and carrying a blood-stained Stanley knife as she rang 999 to tell police what she had done.
Leeds Crown Court was told she may have been trying to prove the youngster was not a robot, as she had "irrational beliefs" about how people "may not be human and may be controlled by a higher and hostile force.".The girl denied murder but pleaded guilty to manslaughter by diminished responsibility.
Sentencing the teenager, Mr Justice Soole said: "On that afternoon you went with Katie to a field near your home in York.
"What happened next is known only to you, since you remain unwilling and/or unable to say anything about it beyond your plea of guilt."
"The utter tragedy and devastation of all this needs no emphasis."
The judge added: "The gravity of the offence of killing a small child speaks for itself.
"However, as both counsel submit, your mental condition at the time of the offence must reduce the level of your culpability."
The defendant appeared in court via a video link from another room in the court building.
She sat between a court usher and youth offending officer with her arms folded and head bowed throughout the hearing.
The teenager did not reply when asked to confirm her name. The officer then spoke to confirm her identity.
Katie's parents and other family members were in court for the hearing.
The defendant had been made the subject of an interim hospital order at an earlier sentencing hearing so doctors could obtain the "fullest picture" of her mental condition.
Prosecutor Graham Reed, QC, told the court that doctors had concluded that a hospital order was no longer necessary and could be dealt with under usual sentencing guidelines.
The prosecutor said it was the Crown's case that the defendant continued to pose a significant risk to members of the public.
A report by one doctor stated: "We do not yet fully understand (her) reasons for (the) killing. My view is that she should be considered a high risk of serious harm to others."
Nicholas Johnson, QC, defending, said: "We submit that (the defendant) was fundamentally driven to this killing by her mental disorder."
He added: "This was the killing of a child by another child in particular circumstances."
Mr Johnson said the defendant had been unable to address her offending while in custody.
He said: "Those experts are firmly of the view that this is not a malicious refusal by her but a coping mechanism for one who has been traumatised herself from these events."