Guruvayurappan: Guruvayurappan: From Dwaraka to Guruvayur
Guruvayur, Kerala

Guruvayurappan is Lord Krishna, loved all over Kerala as Unnikannan, the little Krishna, though the image itself shows four-armed Vishnu. His temple is at Guruvayur in Thrissur district and is called Bhooloka Vaikuntham, Vaikuntha on earth. This story tells how the image came to Guruvayur.
The temple tradition says that Lord Vishnu himself gave this image to Brahma in Vaikuntha. It shows the four-armed form holding conch, discus, mace and lotus, the very form in which the Lord appeared to Vasudeva and Devaki in the prison on the night Krishna was born. Brahma gave the image to King Sutapas and Queen Prishni, who were doing tapas for a child, and they worshipped it with deep devotion.

Pleased with their devotion, the Lord promised to be born as their son in three births. In the first he was Prishnigarbha, son of Sutapas and Prishni; in the second, Vamana, son of Kashyapa and Aditi; and in the third, Krishna, son of Vasudeva and Devaki. The image stayed with them through every birth. When Krishna built Dwaraka, he himself raised a temple for this image and worshipped it.

When the time came for Krishna to leave the earth, he said to his dear devotee Uddhava, after I go, the sea will cover Dwaraka, but this image will float on the water. Ask Brihaspati, the teacher of the gods, to install it in a holy place, so that people in the Kali age may worship me there. With tears in his eyes, Uddhava kept those words in his heart.

It happened as the Lord had said. The sea rose and Dwaraka sank beneath the waves. Brihaspati, known as Guru, came there with Vayu, the god of wind. They saw the image floating on the waves. Vayu lifted it up on the wind, and the two set out south in search of a worthy place. On the way they met Parashurama, who was himself coming to meet them.

Parashurama led them to the green land of Kerala, which, the legend says, he had won back from the sea. There lay a lake full of lotuses, Rudratheertham, and on its bank Lord Shiva and Mother Parvati were in tapas. Shiva welcomed the visitors and said that this was the most fitting place for the image. Then he gave the spot to the Lord and moved himself across the water to Mammiyur.

Vishwakarma, the architect of the gods, built the temple, and Guru and Vayu together installed the image. Because Guru and Vayu consecrated it, the place came to be called Guruvayur, and the Lord Guruvayurappan, the lord of Guruvayur. This is why devotees believe a pilgrimage is complete only when, after worshipping Guruvayurappan, they also worship Mahadeva at Mammiyur. The temple tank is still called Rudratheertham.

For centuries Guruvayurappan has belonged to every home in Kerala. Melpathur Narayana Bhattathiri composed the Narayaneeyam here, and Poonthanam won the Lord's heart with his simple Malayalam devotion. Babies have their first rice feeding, the choroonu, here, and countless weddings take place before the Lord. The story of Guruvayur reminds us that the Lord whom Krishna himself worshipped was not lost in the flood, but lovingly carried to his devotees.
Source
This is the sthala tradition of the Guruvayur temple, known as the Gurupavanapura Mahatmyam; that Sutapas and Prishni were later born as Vasudeva and Devaki is told in the tenth book of the Bhagavata Purana. Some details, such as Uddhava's part, are told differently.