Barbarika was a grandson of Bhima, and the son of Ghatotkacha. Ghatotkacha was the son of Bhima and Hidimbi. He learnt the art of warfare from his mother Ahilavathi, who was also known as Mauravi. The gods (ashtadeva) gave him the three infallible arrows.