King Mandhata of Surya dynasty ruled his kingdom for a long period. He then gave away the kingdom to his successors and chose to meditate on supreme god Shiva and attain the Shiva's feet at the end. Shiva was pleased with his penance appeared before the king Mandhata and offered him any boon at Mount Kailash. The king prayed to the lord for an idol to worship till his death. Shiva gave him the most holy Shiva Lingam which was too dear to him and which used to be worshipped by Parvati and then the god disappeared.