The establishment of Lord Jagannath along with Balabhadra and Subhadra in the sacred lands of Puri has an old legend associated with it. It is believed that Lord Jagannath is the incarnation of Lord Vishnu. Legend says that in the 5th Manwantara or during the age of the 5th Manu King Indradyumna of the Surya Dynasty was ruling the land of Jambu Dwipa. During this time Lord Vishnu had appeared in Purusottam in the form of Nilamadhab. Being a dedicated devotee of Vishnu, Indradyumna had a strong desire to behold the lord in person. Indradyumna was informed by a sanyasi that Vishnu was present in Nilakandara near Bhubaneswar. As soon as he received this information Indradyumna had sent Vidyapati, the son of a minister to Bhubaneshwar in order to collect information about the deity and to locate him.
When Vidyapti had come to Udra Desa or Orissa he had met a Biswabasu Sabar chief in a Sabar village near Bhubaneshwar. Biswabasu welcomed Vidyapati and gave him to eat half-eaten fruits which had divine smell. As Vidyapati asked from where Biswabasi collected those half eaten fruits, Biswabasu replied that these fruits were given to Lord Vishnu by the lords of the heaven and Vishnu had thrown them half eaten. Biswabasu also said that it was daily duty to collect those half-eaten fruits for himself and his family. Vidyapati requested Biswabasu to take him to Nilakandara and show him Nilamadhab. Having located the place of the deity Vidyapati soon returned to Abanti town and informed Indradyumna about Vishnu. As soon as Indradyumna got the information he started for Nilakandara to have darshan of the Lord.
But unfortunately during that time a disastrous cyclone devastated the place and Nilamadhab had disappeared from Nilakandara. On the other hand when Indradyumna reached the place he heard a divine voice which asked him to perform the Ashwamedha Yajna so that a log of wood with divine specifications would come floating and after which he would be able to achieve the lord.
King Indradyumna had performed Shahasra Ashwamedha Yajna at a place where now the Indradyumna tank is located. On completion of the sacrifice he soon found out that the Daru with divine marks came floating and touched the shore of Puri. The log was lifted from water and carried to the place where the sacrifice had been performed. As the log was brought to that place an old and unknown carpenter had appeared at that place. The carpenter said that he would prepare the image of the lord in a closed room for a fixed number of days undisturbed. The legend says that the door was opened before the fixed time period and as result it was found that the images of Lord Jagannath, Balabhadra and Subhadra were incomplete and the carpenter had also left.
As a result of such an incident Indradyumna started the construction of the temple to install the images in it. After the construction was over the king brought Lord Brahma and Bharadwaja Rishi from heaven down to earth to consecrate the deities and sanctify the temple. As soon as the images were consecrated Indradyumna made all necessary arrangements for performing the Nitis or daily round of worship and all festivals.
But even after Raja Indradyumna passed away the worship of the deities in the temple of Puri have continued in an unperturbed manner till today.