From the epics · 2 tellings · North India, West India
The head that watched the war (Barbarika and Krishna)
Barbarika, Bhima's grandson, comes to Kurukshetra with three arrows that never miss, sworn to fight for whichever side is losing. Krishna, seeing that this would leave no one alive, comes as a Brahmin and asks for his head, and Barbarika gives it. The head watches the war from a hill and is given Krishna's name, Shyam. The Skanda Purana tells it differently, with Krishna's discus and an old curse.
Barbarika, son of Ghatotkacha, worships the Goddess and gets three arrows that can mark and destroy every target. He promises his mother to fight on the losing side and sets out for Kurukshetra. Krishna meets him as a Brahmin under a peepal and laughs at three arrows. Barbarika's first arrow marks every leaf and circles the Brahmin's foot, where one leaf is hidden. Krishna asks for a gift; Barbarika promises; Krishna asks for his head. Barbarika asks to see the war and gives it. The head is set on a hill; afterwards it says it saw only Krishna's discus. Krishna names him Shyam.
North India · saVaishnava🪔 Khatu Shyam Phalgun Mela
Ghatotkacha marries Kamakantakata and their son is called Suhridaya, named Barbarika for his hair. He serves the Goddess at Mahisagara and gains an arrow of ash that can burn the whole army. At Kurukshetra he boasts he can end the war in a moment; Krishna cuts off his head with his discus. The Goddess explains that in a former life Barbarika was the yaksha Suryavarchas, cursed by Brahma to die by Vishnu's hand. The head is sprinkled with nectar and set on a hill to watch the war.
What is different here:
Krishna's discus kills him; the death is the end of an old curse; the head is kept alive with nectar.