Chantelle Blake, 31, from Moss Side, Manchester, pleaded guilty on the ground of diminished responsibility to the manslaughter of little Kaiya.
Manchester Crown Court heard she was suffering from delusions and hallucinations and has since been diagnosed with paranoid schizophrenia.
However, her barrister, Judy Khan QC, said: "Miss Blake does not accept that she was mentally ill but she does accept that she was not in her right mind at the time of killing her daughter.
"She maintains that she and her daughter were persecuted by her neighbours and she did not, nor has she ever, suffered from delusions or hallucinations.
"She agrees that whatever the situation was with all those external factors, she made a grave error in killing her daughter and she will bitterly regret it for the rest of her life."
She said Blake did it out of 'love and fear' and to protect her daughter. Kaiya's body was found at their home in September 2011, after Blake was treated in hospital for self-inflicted injuries.
Blake had made an anonymous 999 call from Manchester Royal Infirmary, stating that she was receiving treatment for wounds to her wrists and her daughter was dead at home.
Officers said they attempted to call the number back without success, but shortly after a ward sister called police after Blake told her she had suffocated her child.
When police arrived at the house they found Kaiya in bed with a pillow over her face.
Mr Justice MacKay said: "You were thinking in a distorted and deluded way, but you genuinely believed that you were acting to protect your daughter from harm by persons who wished her ill.
"You thought that because you were mentally ill at the time."
Detective Chief Inspector Phil Reade said: "Kaiya's death was an absolute tragedy. She was a happy young girl with her whole life ahead of her.
"Her death has left a huge hole in her family's life that can never ever be filled."
Blake will only be released when cleared by doctors and by a Ministry of Justice independent review panel.
Graham Reeds QC, for the prosecution, told the court the first signs of Blake's 'odd behaviour' had started to show in late 2009 when she was taken in for a psychiatric assessment after calling police about a domestic disturbance.
In 2010, she received a police caution for assaulting her daughter outside a Poundstretcher in Hulme and the following year, the court heard, the child was taken away from her.
Kaiya was returned to her mother shortly before she was killed.
Mr Reeds said: "That separation seems to have been the catalyst for the acceleration of her delusional behaviour."