When Shiva and Parvati killed Bhasmasura the demon, his son Duraasadana was very angry. He performed a long tapasya and obtained the boon of immortality from Shiva. Scared by this, all the gods left heaven and hid in Kasi. Duraasadana followed them to Kashi and so they went to Kedarnath. There, the gods prayed to Parvati. An avatar of Ganesha, Vakratunda, with five faces and ten hands, came out of Parvati's face. She gave him a lion to ride. Vakratunda went and fought with Duraasadana. He assumed his huge form (viswaroop) and placed his foot on Duraasadana's head to remove all his evil thoughts. Duraasadana was reformed and Vakratunda gave him the duty of removing evil, henceforth.