Mount Indrakila was on the banks of the river Bhagirathi.
Arjuna went to Mount Indrakila. He made a linga out of clay and started to pray to Shiva. The news of Arjuna's wonderful tapasya spread everywhere. Arjuna stood on one leg and continualy chanted the mantra that Vedavyasa had taught him.
Suddenly, Arjuna saw a boar. Arjuna thought that this fierce boar might have come to distract him from his tapasya. Alternatively, it might be a relative of the several demons that he had killed and therefore might wish him harm. Thinking this, Arjuna picked up his bow and arrow and let fly an arrow at the boar. Meanwhile, Shiva had decided to subject Arjuna to a test and he had also arrived at the spot disgusted as a hunter. When Arjuna shot an arrow at the boar, so did Shiva. Shiva's arrow struck the boar in its hindquarters and Arjuna's arrow struck the boar in its mouth. The boar fell down dead.
A dispute started between Arjuna and the hunter about who had killed the boar. Each claimed it for his own. They began to fight. But whatever weapons were hurled by Shiva were easily repelled all of Arjuna's weapons. When all the weapons were exhausted, the two started to wrestle.
After the fight had gone on for a while, Shiva gave up his disguise of a hunter and displayed his true form to Arjuna. Arjuna wa ashamed that he had been fighting with the very person to whom he had been praying.
Please forgive me, said Arjuna.
It is all right, replied Shiva. I was just trying to test you. Your weapons have been like offerings to me, you are my devotee. Tell me, what boon do you desire?
Arjuna wanted the boon that he might obtain glory on earth. Shiva gave Arjuna his pashupata weapon. This was such a divine weapon that its possession made Arjuna invincible.