Lord Krishna displayed this form of His only twice during His appearance on earth: once to Arjuna just before the battle of Kuruksetra while speaking the Bhagavad-Gita, and once to His parents, Vasudeva and Devaki, at the time of His appearance in Mathura. This deity was worshipped by Vasudeva and Devaki in Dwarka. When Lord Krishna wanted to end His manifest pastimes on this planet, He entrusted His devoted friend Uddhava, to take good care of the Deity. Lord Krishna prophesied to Uddhava that at the end of His earthly sojourn, the island of Dwarka would be swept away by the sea, 7 days after He would leave. Lord instructed him to rescue this precious Deity which His parents had worshipped, and hand it over to Brihaspati, the spiritual master of the demigods who would come to him. After 7 days, the island submerged in the sea as foretold by Lord Krishna. Uddhava went sadly to the seashore and saw the Deity floating up and down on the waves far away in the sea. He begged the wind god Vayu to bring it closer to him. The wind wafted it gently to the shore and Uddhava picked it up lovingly and cradled it in his arms. As he was wondering how to contact the guru of the demigods, he found that Brihaspati himself was walking towards him. Uddhava told him the whole story of how Lord Krishna had instructed him and Brihaspati who knew everything agreed to take it and install it at some special place. He was sure that he would be given further instructions. Brihaspati asked Vayu to transport him through the air so that they could choose a perfect spot for the installation.
Carrying the precious Deity made of Patala Anjanam in his hands, Brihaspati was carried across the sub-continent of India till they came almost to the sea shore to the spot where the present town of Guruvayur now stands. Looking down Brihaspati saw a beautiful lake filled with lotuses on the banks of which Lord Siva and Parvati were dancing. He was charmed by the sight and he requested Vayu to float him down. For some time he stood spell-bound by the dancing couple. When they had finished their divine dance, he prostrated to them and begged Siva to tell him of a perfect spot to install this Deity of Lord Krishna. Siva said that this was indeed the ideal place. He told him to build the temple right there at one end of the lake where he and Parvati had been dancing. He magnanimously said that he himself would take up residence at the other end of the lake which was known as Rudrathirta. During the course of time the lake dried up little by little and now only the temple tank adjoining the Guruvayur temple remains. The temple of Mammiyoor (derived from Mahima-yoor, i.e. “the place of glory”), to which Lord Siva shifted still exists. It is for this reason that a visit to Guruvayur is considered incomplete without visiting Mammiyoor temple. Guru and Vayu installed the deity in the temple built by Viswakarma, the architect of the demigods. He made it in such a way that on the day of Vishu (summer equinox) the first rays of the sun fall straight on lotus feet of Sri Krishna. As Guru and Vayu together founded the temple, the place came to be known as Guruvayurpur in accordance with Lord Siva’s wish. The name was later shortened to Guruvayur (guru for Brihaspati and vayur for Vayu).
King Janamejaya, son of Maharaj Pariksit performed austere devotion for 4 months, as a penance for the killing innocent reptiles. Janamejaya, in order to avenge the death of his father Pariksit, brought about by the Naga chief Takshaka, performed the “Sarpa yajna” (snake sacrifice) in which thousands of innocent reptiles perished. As a result of their curse that befell him, he was afflicted with leprosy, which left him in utter despair. Sensing this, sage Dattatreya appeared before him with a remedy: ‘Beg for mercy of Lord Krishna at Guruvayur’. Janamejaya asked about the glories of the Lord and the whereabouts of the place. In reply, the sage recounted from Narada Purana the pastime connected to this Deity. At the beginning of the Padma Kalpa, Lord Krishna gave this deity to Brahma, who could execute his task of Creation by worshipping the Lord in His deity form. In the Varaha Kalpa, Sutapa and Prishni, who had no children, prayed to Brahma for the gift of a son. Brahma gave them this deity to worship, and said that their desire for a child would soon be fulfilled. After worshiping this deity for some time, Lord Krishna offered them a benediction, and Sutapa and Prishni then requested Him to personally become their son. Thus, in three separate avatars (incarnations), Lord Krishna as Prishnigarbha, Vamana, and Krishna Himself, became their son. In each of the incarnations the deity also reappeared and was worshiped by Sutapa and Prishni. When Lord Krishna Himself appeared, this deity was worshiped by Vasudeva and Devaki in a temple in Dwarka for 100 years.
Moved by this hearing the glories of Guruvayur Sri Krishna, Janamejaya proceeded to Guruvayur temple where he observed austere devotion for 4 months. One night while asleep he felt the Lord’s healing touch over his body and his pain was no more! He returned to his kingdom elated singing praises for the Lord.
Pracetas, the sons of Pracinabarhi, also came to Guruvayur to do penance to Lord Krishna. Sensing their desires, Lord Siva emerged out of the Rudra tirtha and spoke to them the “Rudra gita”, a hymn in praise of Lord Krishna. Siva suggested them to chant it with all their heart to get their wishes fulfilled. The Pracetas won the favour of Lord Krishna after rigorous tapas for 10,000 years under the waters of Rudra tirtha chanting Rudra gita. Later they married and begot as their son Prajapati Daksha.