After Haridwar, the Guru took his route towards Gorakhmata, about twenty miles north of Pilibhit, and reached there via Joshi Math and Almora. Almora was ruled by the rulers of Chand family and they used to do their offerings of human beings to please their goddess Chandi. The Guru showed them the path of truth and thus stopped them from massacring innocent people to please their goddess.
From there he reached Gorakhmata which was the abode of Jogis of Gorakhnath clan.
Gurdwara Sri Nanak Mata Sahib is associated with Guru Nanak Sahib Ji. At the time, Gurdwara Sri Nanak Mata Sahib was the abode of the devotees of Guru Gorakhnath and it was called "Gorakhmata". The yogis who lived there did not want the local people to become learned enough to challenge his superiority. Therefore, by using their occult power, they successfully exploited the poor people and obtain advantage due to their ignorance. These Jogis had powers of Ridhi-Sidhi (supernatural powers). Their blessings were eagerly sought by the family men. People avoided their curses at all costs. Public from far and near had heard about these Jogis and their popularity was widespread. It is said that these Jogis (Yogis) had also heard about the Guru.
When he reached there, they received him with great courtesy and invited him to adopt their cult, wear their garb and join them as a Yogi. The Guru explained to them that the life of seclusion which was not in the service of their fellow beings, was worthless.
Guru Nanak Sahib Ji sat near the present location of the Gurdwara meditating under a pipal tree (Sacred fig or Ficus religiosa tree). The yogis were surprised to see him there as this place was quite inaccessible, especially during the winter months. The weather being cold, Bhai Mardana asked the yogis for some fire. However, they refused to help Bhai Mardana. The yogis, instead, taunted him and told him that he should go and ask his Guru who was with him.
At this, Guru Nanak Sahib Ji looked at a pile of firewood nearby and it instantly ignited. Bhai Mardana was thus able to keep warm and enjoy the fire. Suddenly, the weather changed for the worse and it began to rain. As a result, the fires lit by the yogis were extinguished but the one lit by Guru Ji was not affected at all. The yogis realized their mistake and fell at the feet of the Guru. The next morning, they all gathered together and came to Guru Ji for a religious discussion. They again used their occult powers and tried to lift the pipal tree under which Guru Ji was sitting out of the ground. When the tree had risen by a few feet, Guru Ji simply placed his hand on it and it stopped rising. The same tree can be seen in the Gurdwara compound. Guru Ji explained to the yogis the path of true meditation and salvation. The yogis learnt from the Guru and gained valuable knowledge ("Matt"). This place then came to be known as "Nanak Matta" and became a major centre of the udasi sect.
As explained earlier, this place used to be retreat of Gorakhpanthi Nath Yogis and was called Gorakh Mata before Guru Nanak Sahib came here during his travels in early sixteenth century. The Yogis at first behaved contemptuously towards the Guru and tried to overawe him with their occult powers. But as he remained undaunted and unaffected by their rudeness and miracle-making, they agreed to talk to him. Guru Nanak Sahib impressed upon them the impropriety and unrighteousness of their path of renunciation, and exhorted them to live a pious yet active life of a God-oriented man of the world.
The Guru uttered the following Shabad:
"Religion consisteth not in a patched coat, or in a Jogi's staff, or in ashes smeared over the body;
Religion consisteth not in earrings worn, or a shaven head, or in the blowing of horns.
Abide pure amid the impurities of the world; thus shalt thou find the way of religion.
Religion consisteth not in mere words;
He who looketh on all men as equal is religious.
Religion consisteth not in wandering to tombs or places of cremation, or sitting in attitudes of contemplation;
Religion consisteth not in wandering in foreign countries, or in bathing at places of pilgrimages.
Abide pure amid the impurities of the world; thus shalt thou find the way of religion. On meeting a true Guru doubt is dispelled and the wanderings of the mind restrained.
It raineth nectar, slow ecstatic music is heard, and man is happy within himself.
Abide pure amid the impurities of the world; thus shalt thou find the way of religion. Nanak, in the midst of life be in death; practice such religion.
When thy horn soundeth without being blown, thou shalt obtain the fearless dignity-
Abide pure amid the impurities of the world, thus shalt thou find the way of religion."
Sri Guru Granth Sahib Ji, Suhi Mohalla 1, Ang 730.
On hearing this, the Yogis paid their respects to Guru Nanak. The Guru's teaching became so effective that Gorakhmata became Nanakmata.
Associated with Sri Guru Nanak Sahib Ji.
Sri Guru Nanak Sahib Ji sat near the present location of the Gurdwara meditating under a Pipal tree.
Gurmat Gyan (Knowledge)
Other Gurbani Contributors