A 16-year-old girl has admitted the manslaughter of seven-year-old Katie Rough.
The girl appeared by video link at Leeds Crown Court where she pleaded guilty to manslaughter by diminished responsibility.
Katie was found with severe lacerations to her neck and chest on a playing field in York in January and died later in hospital.
The dark-haired girl appeared on the video link sat next to a solicitor and wearing a black hoodie.
Her solicitor confirmed her name when asked by the judge, Mr Justice Soole.
Nicholas Johnson QC, defending, asked the court if the charge of murder could be put to the girl again and she wrote her plea on a piece of paper.
Her solicitor told the court: "I can confirm she has indicated not guilty to murder but guilty to manslaughter."
Graham Reeds QC, prosecuting, said: "We are going to accept that plea of manslaughter by diminished responsibility."
Mr Reeds said the defendant has been subject to four psychiatric and psychological reports.
He said there was no dispute that her mental health problems meant she was suffering from diminished responsibility at the time she killed Katie, even though the killing was pre-planned.
Mr Reeds told a judge sitting in a packed courtroom how the teenager was found in the street in York by a member of the public.
She told him Katie was dead and asked him where she was. The man then found Katie lying on a nearby piece of land with a cut to her neck.
She appeared to have no pulse or signs of breathing, Mr Reeds told the court.
The prosecutor said a post-mortem examination showed Katie had two severe cuts to her body - one to her neck and the other to her torso - but neither caused her death. Mr Reeds said Katie had been smothered before the cuts were made.
Katie's family were in court to hear the guilty plea by the defendant, who cannot be named for legal reasons.
Mr Reeds told the court a local resident had seen the two girls on a sports and recreation area known as The Square on the afternoon of January 9.
He said the resident saw both girls lying on the grass, with the teenager on top of Katie, but said both got up and Katie appeared unharmed and not in distress.
A short time later, another resident saw the teenager "distressed, covered in mud and had a blood-stained right hand", and took her into their home.
The court heard the teenager, who was 15 at the time, had called police and told them the girl was dead and she did not know where she was.
A short time later, Katie's mother Alison arrived at the scene with her husband and found a police officer attempting to resuscitate her daughter.
Mr Reeds said: "Upon seeing the blood in Katie's hair, Alison started screaming. She then tried to cradle Katie's head."
The couple were led away by the police officer in "considerable distress, with Alison saying 'she's killed my daughter'".
The teenager was arrested and appeared upset and in shock.
She produced a blood-stained Stanley knife she had taken from her grandmother's kitchen. She made no comment when later interviewed by police.
Mr Reeds told the court the teenager had displayed "strange behaviour towards other people and herself", and had started to self-harm before she killed Katie.
A friend interviewed by police following Katie's death told them she was "nice but weird" and said she liked to talk about death.
She said she had a book in which she drew pictures depicting death and had plans to run away and self-harm.
The friend said the teenager told her she dreamed of killing someone, said people were out to get her and she heard voices in her head.
Police recovered a number of items from the scene and from the teenager's home.
These included drawings of stick-men in various poses depicting killing and death, and a reference to "they are not human".
The paper was blood-stained and the court heard it had been cut with the same knife used to slash Katie.
Her bedroom contained books, notes and comics of a violent nature, and a Simba soft toy that had its ears cut off and stuffed into its stomach through a vertical slash.
Mr Reeds told the court how the defendant had developed severe mental health problems during 2016.
She was given medication for anxiety and depression, and had been suffering from delusions, he told the judge.
The prosecutor said the girl had talked of being convinced that people "weren't human and were robots".
He said the girl got distressed when one doctor asked her "whether she killed Katie to test whether she was a robot".
Mr Reeds said her family had taken her out of school due to her problems, which included self-harming and suicidal thoughts.
He said that although psychosis was being investigating prior to the killing, it had not been diagnosed.
The prosecutor said the experts disagreed on her exact diagnosis but one thought she was suffering from an emerging schizotypal personality disorder, but she was not schizophrenic.
Mr Reeds said: "Over a course of a year, she developed an interest in the macabre.
"She lost most of her friendship group at school, started to harm herself with a blade. She was frequently very upset and reported suicidal thoughts."
Mr Johnson told the court his client had been having "delusional and bizarre thoughts" for months and had been self-harming since Christmas 2015.
He said the teenager had thoughts that people around her "may not be human and may be controlled by a higher and hostile force".
The barrister said his client had posted a picture on social media two days before the killing with a concerning message.
He said: "She was clearly crying out for help and support."
The judge, Mr Justice Soole, said he wanted more questions answering by the medical experts before he could pass sentence. He adjourned the case to a later date.