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.