Barbarika, also known as Khatushyamji, was a powerful warrior in the Indian epic Mahabharata. He was the grandson of Bhima and the son of Ghatotkacha.
According to the Mahabharata, Barbarika was born with the ability to see the past, present, and future, and was an unparalleled warrior. He was also known for his devotion to Lord Shiva.
Barbarika was approached by both the Pandavas and the Kauravas to fight on their side in the Kurukshetra War. However, he refused to take sides and instead offered to give each side three of his hairs, which he claimed would guarantee victory for whoever possessed them. The Pandavas and Kauravas both accepted, and Barbarika gave them the three hairs, but warned that if all three were used in the war, the world would come to an end.
During the war, Bhima, one of the Pandavas, used all three of the hairs and killed all the remaining Kauravas and their allies. However, Lord Krishna, who was the charioteer of Arjuna, the leader of the Pandavas, revealed that Barbarika had already been killed by him in a previous battle, and the hairs were just a test of the Kuru’s arrogance and ignorance.
In some versions of the Mahabharata, it is also said that Lord Krishna blessed Barbarika with an eternal life and he became an incarnation of god Khatushyam. He is still worshiped in many parts of India, particularly in Rajasthan and Gujarat.