Since Janamejaya was responsible for the death of millions of snakes, he was afflicted with leprosy. He lost all hope of a cure. One day Sage Atreya (son of Atri) came before Janamejaya and told him to take refuge under the feet of Krishna at Guruvayoor. Atreya told him that in the temple at Guruvayur the effulgence of Sri Hari is at its best and Vishnu showers his blessings on all devotees. He immediately rushed there and spent the next ten months worshipping the god of Guruvayur. At the end of ten months, he returned home healthy and took the astrologer to task for making a false prediction. The astrologer told him that he would find the mark of a snakebite on his left leg. He had escaped death only because he was at that time in a temple where Anantha (the emperor of serpents) was present and Anantha was the brother to the God at Guruvayur where he had finished worshipping.