When the Pandavas were in exile, Sage Vyasa told them, "After your exile, you will have a war with the Kauravas. Arjuna should pray to Shiva for divine weapons." Arjuna went to Mount Kailash and started worshipping Shiva. Pleased, Shiva disguised himself as a hunter and came to test Arjuna. Just then, a demon, Mooka, attacked Arjuna in the form of a wild boar. Arjuna shot an arrow and killed it. But he saw another arrow in the body of the boar. He said "Who dare shoot my pray?" Shiva in the hunter's form, said, "I shot the arrow. This is my prey." A long fight followed between the two and Arjuna became tired. He said, "I will fight after my prayers." Arjuna made a Shivalingha and put a garland around it. But to his dismay, he found the garland around the hunter 's neck. He understood that the hunter was Shiva. Shiva came to his real form and gave him the pashupatastra.