Gurdwara Shri Nanak Matta Sahib is associated with the first Sikh Guru, Guru Nanak Dev ji who visited here during his Third Udasi in 1514 A.D. Baba Al Mast Ji & Guru Hargobind Sahib Ji also visited this place. It is situated between Khatima and Sitarganj on the Khatima - Panipat National Highway in Uttarakhand, India.At that time, this place was the abode of the Siddhas (Yogis - devotees of Guru Gorakhnath) and it was called Gorakhmatta. The siddhas who lived here did not want the local people to become learned enough to challenge their superiority. Therefore, by using their occult powers, they successfully exploited the poor people. Guru ji taught the yogis the path of true meditation and salvation. This place then came to be known as Nanak Matta.
Historical Panja Sahib (The historical Pipal tree) is situated in the main Gurudwara Campus between the main Gurudwara and the Gurudwara Sixth Patshahi. Guru Nanak Dev ji reached this place and sat for meditation under a dry pipal tree, which became green due to the holy sangat of Guru Ji. The yogis were surprised to see Him there. as this place was quite inaccessible, especially during the winters.
The yogis using their occult powers pulled the pipal tree from the earth and tried to fly it in the air to disturb the meditation of the Guru Nanak Dev Ji. When this tree came out of the earth and its roots were sufficiently above the ground, Guru Ji put his hand (Panja) on the roots of the Pipal tree. The tree stopped flying and remained in the current situation. The roots of the pipal tree above the ground can be seen even today.A century later, after the Guru Nanak Dev Ji's visit Bhai Al Mast Ji came here. Baba Al Mast (means enthusiast) had been preaching Sikhism at Nanak Matta. He was expelled from his shrine by the Yogis who had also burnt the sacred pipal tree under which Guru Nanak had held debate with the followers of GorakhNath. Enduring all hardships, Baba Al Mast Ji waited until the Guru Har Gobind Singh Sahib Ji came to repair and take possession of Guru Nanak's temple. He sprinkled saffron on the burnt pipal tree which came back to its full bloom.
Baoli Sahib, is located on the banks of the river Ghagghar in the town of Nanak Matta, district Udham Singh Nagar, situated near Nanak Sagar Dam. It is about one and a half kms from Gurudwara Nanakmata Sahib. This place is known so because here is a small baoli (pond) of water. This baoli was brought here by the order of Shri Guru Nanak Dev Ji. Some Yogis resided here when Shri Guru Nanak Dev Ji visited this place. They were jealous of Guru Nanak Dev Ji and were preparing magical competition for Him. The yogis, using magical occult powers, dried up all the water in this area. They then challenged Guru Nanak Dev Ji to bring water here.
Guru Nanak Dev ji instructed Bhai Mardana to pick up a spade and go to the nearby river. He told Bhai Mardana to drag the river behind him with the spade without seeing back. Bhai Mardana did as instructed and the river started to follow him as he dragged his spade over the ground. When he reached this place, Bhai Mardana looked back to see if the river was coming behind him.
Immediately, the river stopped following him and stopped at this place. When the river stopped its flow, Guru ji asked the yogis to use their occult powers and move the river further at the place where Guru Ji was sitting. However much they tried, the yogis could not do so. They realized their fault and fell at the feet of the Guru Ji, accepting their defeat. A baoli was constructed here, thereafter known as Baoli Sahib.
Guru Nanak Dev Ji reached this place and sat for meditation under a pipal tree. The yogis were surprised to see him there as this place was quite inaccessible, especially during the winters. The weather being cold, Bhai Mardana requested the yogis for some fire but was refused. The yogis, instead, taunted him and told him that he should go and ask his Guru who was with him. Knowing this situation, Guru Nanak Dev ji looked at a pile of firewood nearby and it got lit instantly. The weather suddenly became bad 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 and remained glowing till the next morning. The yogis realized their mistake and fell at the feet of the Guru. This place can be seen in the main Gurudwara.