The first history of the appearance of Lord Jagannatha is given in the Skanda Purana, as well as in the Padma Purana, the Purusottama-mahatmya, and The Diary of Jagannatha. The particular version presented here is from the Skanda Purana and the Purusottama-mahatmya. There are minor differences in the versions from the other scriptures, but the history is basically the same.
In Satya-yuga there lived a King named Indradyumna Maharaja, and his wife was Gundica. A devotee told the King, “Anyone who receives Nila-madhava’s darsana will not have to return to this world and will be liberated forever. He will attain a four-handed form and become an associate of Narayana in Vaikuntha. He called Vidyapati, the very intelligent son of his priest, as well as his officials and commanders, and ordered them all to search in different directions. After three months they had all returned except Vidyapati, and the King was worried because no one knew where he was. Vidyapati had gone to the east coast of India, near the Indian Ocean, and there he traveled continually, searching and searching for Nila-madhava. One day, on the shore of the ocean, he saw a very beautiful village, where there was a mountain covered with flowers and trees and where the residents were very cultured. Evening was approaching and he decided to stay in that village, so he told some of the residents, “I would like to rest here tonight.” They replied, “Visvavasu is the prominent leader of this village. He is a sabara (a lower caste), but he is very qualified and religious-minded, and he is also intelligent, humble, and liberal. Whenever any traveler or guest comes, he visits Visvavasu’s house; so you must go there.”
When Vidyapati arrived, Visvavasu was not at home. Only his very beautiful sixteen-year-old daughter was their here and there for some days. Vidyapati began to develop a close friendship with her, and after some time he fell in love with her. She asked her father, he agreed, and Vidyapati became Visvavasu’s son-in-law.One day Vidyapati privately said to his wife, “My dear,now you are my wife, and I have great faith in you. Can you tell me where your father goes every day for worship, and where that fragrance comes from? Please tell me.”
He began to show so much love and affection to his wife that she revealed everything about Nilamadhaba. I will take your husband with me and show him Nila-madhava, but there is one condition. I will tightly bind his eyes with a black cloth, and when we reach there I will remove it so he can take darsana. After that, I will put on the blindfold again. So he will have darsana, but he will not know where he is.”Lalita, being very clever and intelligent, gave her husband some mustard seeds and said, “Keep these in your pocket. Now it is the rainy season. You can drop them one after another along the way. After some time, those mustard seeds will grow into plants producing bright yellow flowers. Then you will be able to follow the flowers and go there by yourself; you will not have to ask my father the way.”When they entered the temple, Visvavasu removed the blindfold so that Vidyapati could see Nila-madhava. The deity was four-handed, and He carried the sankha (conch), cakra (disc), gada (club), and padma (lotus flower). Then Visvavasu heard Nila-madhava telling him, “You have served Me for a long time. Now I want to take the royal service of a very high class of devotee named Indradyumna Maharaja. Don’t be afraid and don’t worry.” Visvavasu, however, immediately became upset and thought, “Oh, Thakurji will go to Maharaja Indradyumna? I cannot bear the thought of separation. King Indradyumna became very happy when he heard from Vidyapati, “I have discovered Nila-madhava. In the dense forest he followed the grown up mustard plants to reach Nilakandara, but found the lord missing. A divine voice aired him to build a temple on Nilasaila (Blue Mountain) at sea shore. The king immediately ordered for temple construction. He searched for a carpenter to make the deities. King Indradyumna found a mysterious old Brahmin carpenter who appeared and took the responsibility and took a few days to accomplish that. Surprisingly the carpenter insisted that he would not be disturbed while he was carving the deity and start working closed door. Every one including King and his Queen were very much anxious and come every day to the closed door and there was sound of working. After 6-7 days waited anxiously outside his room, but after some time, all sound stopped. The impatient Indradyumna’s Queen worried what had happened and assuming the worst, opened the doors – only to find the deity half-finished and the carpenter vanished! The mysterious carpenter was none other than Vishvakarma, the heavenly architect. The king was distraught as the deity had no arms and legs. Utterly repentant that he had interrupted the carving, the king was only pacified when the muni (sage) called Narada appeared and explained that the form the king now sees is a legitimate form of the supreme personality of godhead. The three idols represent the god Jagannath, his elder brother, Balabhadra and their sister, Subhadra.