of Atri) came before Janamejaya and told him to take refuge under the feet of Krishna at Guruvayur. Atreya told him that in the temple at Guruvayur the effulgence of 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 Ananta (the king of serpents) was present and Ananta was the brother to the deity at Guruvayur where he had finished worshipping. The king then decided to build a full-fledged temple at Guruvayur. In time, this temple came to be downgraded and reduced to poverty during the days when Kerala was ruled by the Perumals. The Perumal rulers were mostly Shaivites and did not extend their patronage to Vaishnavite shrines. The Shiva temple at Mammiyur received their patronage and with the shift of royal patronage, the worshippers also moved to the Shiva temple. The Guruvayur temple was thus reduced to utmost poverty. However, one day, a holy man went to the Mammiyur temple for food and hospitality for the night. Though the temple was affluent, the temple authorities pretended they had nothing and scornfully directed him to the neighbouring Guruvayur temple. When the holy man entered the precincts of that temple, he was courteously received by a Brahmin boy and sumptuously fed. The holy man was very much pleased and he pronounced a blessing. According to the legend, Mammiyur Siva temple began to decline, and the fortunes of Guruvayur Vishnu temple progressed from strength to strength. History Pre-colonial age In the 14th century, the Tamil literature "Kokasandesam" refers to a place named "Kuruvayur" and in the 16th century (fifty years after Narayaniyam was composed) there are also multiple references to Kuruvayur. In Old Tamil, "kuruvai" means "sea", hence the village on the Malabar Coast may be called Kuruvayur. The earliest temple records date back to the 17th century. The earliest mention of the many important Vishnu temples of Kerala are found in the songs of Alvars, the Tamil poet-saints, whose time-line is not exactly fixed. However, by the end