Before the Mahabharata war began, Krishna queried few great warriors that how long would the war take in order to be finished. Bhishma replied it would take 20 days for him to finish the war. Similarly, Dronacharya answered 25 days, Karna answered 24 days and Arjuna answered 28 days. But all got surprised when Barbarika, one of the warriors marks only 1 minute for him to finish the war.
Barbarika is the son of Ghatodkacha (Son of Bheema and Hidimba) and Mauravi (Daughter of Muru, King of Yadav). He learned the art of war from his mother and was a strong devotee of Lord Shiva.
He became powerful after he received the boon from Lord Shiva. He received 3 arrows from Eight Gods (Asta-Deva). It is known as ‘Teen Baan‘, where the first arrow was capable of marking all the things that are a target, the second arrow was capable of marking those that Barbarika wants to save and the third one was capable of destroying all those are unmarked from safe markings. In other words, Barbarika was capable of killing everyone with the release of his three arrows.
Knowing this power of Barbarika, Krishna decided to plays a trick. Shri Krishna disguises himself as a saint when Barbarika was on his way to join the war and ask Barbarika to show his power by marking all the leaves in the forest. When Barbarika closed his eyes to release his arrows, Krishna hid one leaf below his feet. After the release of the first arrow, it marks all the leaves in the forest at once and hovers around Krishna’s feet. When Krishna asks why the arrow is hovering around his feet, Barbarika says that a leaf must be there under his feet. This confirmed Krishna that Barbarika could finish the war within a minute.
In curiosity, Krishna asked Barbarika that which side he would fight for. In return, Barbarika said that he promised his mother to use his power only for the weaker side. Since Pandavas were on the weaker side he would fight on their side. Krishna asked again to Barbarika that what if his power weakens the Kauravas, he had to switch his sides fighting against the Pandavas. This could continue until he is left alone and nobody wins.
Therefore Krishna, still on the disguise of the saint, asked Barbarika for something. Barbarika promised to give anything he wants. Krishna then asked for the head of Barbarika.
Barbarika feeling nervous and confused asked who the saint was and then Krishna reveals himself by showing the true powerful face of Lord Vishnu. Barbarika is one of the two warriors who actually saw the actual Krishna in his grandeurs divine form. Barbarika pleads Krishna although he could not participate in the Kurukshetra war, he would wish to see all the war. Lord Krishna agreed and gave this boon to Barbarika. Barbarika cut his head off and gave it to Lord Krishna. Krishna places his head atop on hill where he could witness all of the Mahabharata war.
After the war ended, the victorious Pandavas argues about who the main reason for the victory of the Mahabharata war was. Lord Krishna then advises them to ask Barbarika, who was the silent witness of all of it. Barbarika replies that it was Krishna and his presence and advice that was the main reason for the victory because he could only see Krishna playing the game.
Barbarika’s head was drowned in the river named Rupawati by Krishna giving lots of blessings. After many years after the start of Kaliyug, Barbarika’s head was found buried in the village of Khatu, Sikar district, at present day Rajasthan. Roopsingh Chauhan, King of Khatu had a dream that he should build a temple for Barbarika’s head and so he built a temple and placed Barbarika’s head in there.
The place where the idol was dug is called Shyam Kund. In Rajasthan, Hindus worship Barbarika in the name of Khatu Shyam ji. He received the name of Krishna (Shyam) because of his great sacrifice and immense belief in the Lord. Krishna had declared that just by taking the name of Barbarika with a true and selfless heart would be granted their wish. In Nepal, King Yalamber is portrayed as Barbarika. Yalamber is considered as the first King of Kirat Dynasty of Nepal.
Based on Skanda Purana