Guru Nanak came to Puri in 1508 with his Muslim disciple Mardana. When they went to Lord Jagannath’s temple in Puri, seeing Mardana the pandas would not allow the disciple or the guru inside.
The local tradition describes that Guru Nanak then went to the ocean at the place known as Swargadwar, where he sat down and prayed. Meanwhile, Mardana was hungry, and blamed Nanak for bringing him to a place where they were unable to enter the temple to get Mahaprasad.
In the evening, someone mysteriously appeared and offered them opulent food and drink in golden utensils. That same night the king of Puri had a dream that Jagannath had personally taken prasad to a sadhu on the beach.
The next morning when the priests went to wake Lord Jagannath they found that his golden plate and cups were gone. This created an uproar, and the king of Puri was informed of the apparent theft.
The raja just smiled and set off in a procession to the beach. Arriving there, the king offered obeisances to Guru Nanak, who at that time is said to have told the raja, “Jagannath is not only the Lord of the Hindus and Puri. He is the Lord of everyone.” The king then welcomed Guru Nanak and his followers to have darshan of Jagannath inside the temple.
From that day, Guru Nanak’s followers, the Sikhs, have been allowed entry into the Puri Jagannath temple.