When Guru Har Rai perceived that the time of merger of his light, was near, he sent messages to his beloved Sikhs and Masands. One day addressing the congregation the Guru said, “Guru is only light not a body. As the clouds come and after showering rain disappear, similarly Gurus come and after cooling the hearts of the bewailing mankind and bringing the morally degenerated people to the right path, disappear. Now the time of abandoning this world has come near. The light of Guru will now pass into the body of Harkrishan. He will be your guide in both worlds. Who serves him with devotion will get fulfilled all his desires. Don’t consider him a child. He is now true Guru. He will now show you the divine path.”
The Guru Har Rai got up from his seat and guiding Sri Harkrishan asked him to sit on his throne. Then he placed a coconut and five coins before Guru Harkrishan and bowed before him. Then he circumambulated Guru Harkrishan three times.Then Baba Gurditta the son of Baba Bhana offered him a sword and tied aigrette on his turban. He also applied Tilak on his forehead. After that baba Gurditta bowed before Guru Harkrishan, turn by turn.
When the Sikhs heard the news that Guru Harkrishan had become the new Guru, they flocked to Kiratpur to pay homage to the new Guru.
When Ram Rai the elder son of Guru Har Rai was informed that Guru Harkrishan Ji had succeeded Guru Har Rai as the Divine Guru, he became very furious. He had up his mind to complain to Aurangzeb. Guru Har Rai had excommunicated him as he had changed one verses of Guru Nanak Dev Ji and uttered ’Mitti Baiman Di’ Instead of ‘Mitti Musalman Di.’ This conduct of Ram Rai hurt Guru Har Rai and he bestword Guruship in Harkrishan.
Aurangzeb heared the complaint of Ram Rai and granted him a piece of land on the banks of river Yamana in the hilly area. Ram Rai settled there and founded there a city named as Dehradun.