RUKN UD-DĪN, QĀZĪ or QĀDĪ (Rukan Dīn of the Janam Sākhīs), supposed to be a shrine caretaker, chanced to meet Gurū Nānak during his visit to Mecca. The Purātan Janam Sākhī narrates the story : "It had been inscribed in books beforehand that Nānak, a dervish, would come. Then water would rise in the wells of Mecca. The Gurū entered the holy precincts. He lay down in the colonnade to rest. Then he fell asleep. His feet were stretched out towards the Kā'bā. It was time for the evening prayer. Qāzī Rukn ud-Dīn came to say his namāz. When he beheld him lying in this posture, he spoke out, ‘O thou, man of God, see! Thou stretchest thy feet towards the House of God, the Kā'bā. Dost thou not see?' The Gurū answered, ‘Where the House of God is not, turn my feet to that direction.' Then Qāzī Rukn ud-Dīn dragged his feet round. In whatever direction he turned his feet to that direction the Kā'bā was also turning. Qāzī Rukn ud-Dīn became astonished and kissed his feet... He said, Marvellous, Marvellous! Today I have seen a true faqir of God.' "
Qāzī Rukn ud-Dīn of this sākhī or episode should not be confused with Shaikh Rukn ud-Dīn, grandson of Shaikh Baha ud-Dīn Zakarīā of Multān, who had lived during the earlier part of the fourteenth century and died in 1335. In Bhāī Gurdās, Vārāṅ,1. 32, the name is Jīvan which indicates a man of Indian domicile.