During the fourth journey which took five years, Guru Nanak travelled towards West and went right up to Mecca. He donned a Muslim dress, a stick in one hand, a book under the other arm and a prayer mat over his shoulder. He along with His companion Bhai Mardana started from Kartarpur.
On their way they visited Shikarpur, Rohtas, Dega Ghazi and Sindh. From there they joined a party of Hajis and set sail with them across the Arabian Sea, from the Southern Coast of Baluchistan. They reached Jeddah, in the Red Sea; from there they travelled with pilgrims in slow-gliding caravans.
According to Janam Sakhi, a Hazi travelled with the Guru. As they were marching forward, Hazi saw a small cloud travelling with them over their heads. The cloud was protecting them from rays of scorching Sun. The Hazi thought that cloud was over his head.
He said to himself, 'As I am a sacred Muslim pilgrim, so God has sent this cloud for my peaceful journey.'
Then he said to the Guru, 'You are a Hindu, don't travel with me. You should either walk ahead or behind.'
The Guru said, 'As you desire, go ahead, I will stay here for some time.'
When the Hazi stepped forward and looked back he saw there was no sight of the Guru and Bhai Mardana and even the cloud. He felt very sad and said to self, 'I have seen God Himself.'
Crossing the rocky ranges, the Guru and Bhai Mardana entered the valley of Mecca.
According to Janam Sakhi, when the Guru entered the valley the level of water rose in the wells of Mecca.
Arriving at Mecca, Guru Nanak felt tired. He had travelled a long and arduous journey to reach the holy city. He fell asleep. He slept with his feet towards Kaaba, the House of God, instead of his head. It was against the principles of Islam.
When at night a Qazi came there he saw Him lying in that posture. He was enraged to see the Guru sleeping with feet pointing towards Kaaba.
He cried, 'O man, do you not see? Why are you stretching your feet towards the House of God?'
The Guru awoke and said, 'Brother, don't be angry. I am very tired. I need rest. I respect the House of God as much as any one. Please turn my feet in a direction in which God or the House of God is not.'
The Qazi took hold of the Guru's feet. He dragged them in the opposite direction. Then he lifted his eyes. He saw the Kaaba standing in the direction of the Guru's feet. He turned the Guru's feet in another direction. The Kaaba was seen standing in that direction. Qazi dragged the Guru's feet to this side and that. He dragged them round and round. The Kaaba was seen to be going round and round. It was always, in the direction of the Guru's feet. His feet were always towards the Kaaba.
Qazi was stunned. He said to himself, 'Where God is not. His abode is in all four directions.'
He place the Guru Nanak's feet on the ground and fell on them.
He said, 'Wonderful! Today I have seen a true Faqir of God.'
When other pilgrims heard about this they gathered on the spot. They asked the Guru many questions. They had discovered that Guru Nanak was a Hindu by birth. Therefore, their main question was, 'Who was the superior Hindu or Musalman?'
The Guru answered, 'Without good deeds both are useless. Neither the Hindu nor the Musalman will be acceptable to the God.'
Then the Guru uttered a hymn in Persian language.
His poetry and music touched their hearts and they accepted the supremacy of the good deeds.
Bhai Gurdas ji Vaaran, Pauri 32 at Mecca
Dooning blue attire then Baba Nanak went to Mecca.
He held staff in his hand, pressed a book under his armpit, caught hold of a metal pot and mattress.
Now he sat in a mosque where the pilgrims and gathered.
When Baba Nanak slept in the night spreading his legs towards the alcove of Mosque at Kaaba,
The Qazi named Jivan kicked Him and asked who was this infidel enacting blasphemy.
Why this sinner is sleeping his legs spread towards God, Khuda.
Catching hold of the legs he lynched (Baba Nanak) and lo and behold the miracle, the whole of Mecca seemed to be revolving.
All got surprised and they all bowed.
Bhai Gurdas ji Vaaran, Pauri 33 Discussions with the Qazis
Qazi and maulvis got together and began discussing religion.
A great fantasy has been created and no one could understood its mystery.
They asked Baba Nanak to open and search in his book whether Hindu is great or the Muslim.
Baba replied to the pilgrim Hajis, that without good deeds both will have to weep and wail.
Only by being a Hindu or a Muslim one cannot get accepted in the court of the Lord.
As the colour of safflower is impermanent and is washed away in water, likewise the colours of religiosity are also temporary.
(Followers of both the religions) In their expositions, denounce Ram and Rahim.
The whole of the world is following the ways of Satan.
Bhai Gurdas ji Vaaran, Pauri 33 Victory at Mecca
Wooden sandal (of Baba Nanak) was kept as a memory and he was worshipped in Mecca.
Go anywhere in the world, you would not find a place bereft of the name of Baba Nanak.
Without discrimination of Hindu or Muslim, in every house, the Baba is revered.
When the sun rises it cannot be covered and it lightens the whole world.
When the lion roared in the jungle the flocks of deer ran away.
If someone wants to conceal moon by putting before it a platter, it cannot be hide.
From rising to setting directions i.e. from east to west, all the nine divisions of earth bowed before Baba Nanak.