A nanny decapitated the little girl in her care before walking through Moscow carrying the child's severed head.
The woman shouted "Allahu Akbar" as she appeared near Oktyabrskoye Pole metro station in the northwest of the Russian capital and threatened to blow herself up.
It came hours after officers found the headless body of a four-year-old child when they were called to a fire at a block of flats in the city.
The victim was a girl identified as Nastya M - and the child's 38-year-old nanny Gyulchehra Bobokulova, from Uzbekistan, has been arrested.
The woman was seen pulling the severed head out of a bag and walking around near the entrance to the metro station as police moved in.
According to local media, she shouted: "I hate democracy. I am a terrorist.
I want you dead. You have become so hardened, you have eliminated so many of us. Look I am a suicide bomber, I will die, doomsday will come in a second."
Witness Alyona Kuratova told independent Dozhd TV that the woman was holding the head by its hair.
Kuratova described scenes of chaos, with police cars and ambulances arriving at the scene and some people yelling: "Terror attack, terror attack."
She said she could not make out what the woman shouted but some media reported that she yelled, "Allahu Akbar" - Arabic for "God is greatest" - and threatened to blow herself up. Another witness said the woman shouted that she would "kill everyone, blow up everyone".
Some said the woman had paced up and down for some 20 minutes before she was detained near Oktyabrskoe Pole metro station.
According to local reports, she later told police she killed the girl because of her own husband's infidelity. Investigators immediately ordered a psychiatric test of the woman in a bid to understand her motives.
Investigators claim that the babysitter waited until she was alone with the child in the apartment before carrying out the murder and starting a fire.
The source in the Investigative committee told TASS: "She waited until the parents with the elder child left the flat, then for unknown reason she killed the child, set fire to the apartment and left the scene.
"She was detained at the metro station Oktyabrskoe Pole."
The dead girl, who is said to have had learning difficulties and could not walk, had a 15-year-old brother. Her family, from the Oryol region, was renting the apartment.
She suffered damage because of birth problems in August 2011.
The nanny faces up to 20 years in jail if she is deemed psychologically fit to stand trial.
- Daily Mail