This was the demon who turned to ashes anyone whose head he touched. Lord Shiva went into hiding to escape this threat, resting in various places before coming to the cave at Koteshwar Mahadev. Shiva rested here for some time, meditating, before confronting and defeating the demon. A similar legend is associated with Shrikhand Mahadev and Kinner Kailash in Himachal Pradesh.