Baba Ram Rai
Baba Ram Rai was the eldest son of the Seventh Sikh Guru, Guru Har Rai Ji. Guru Har Rai Ji had 3 children. Guru Harkrishan was the youngest amongst the three siblings. Baba Ji sister Sarup Kaur was elder to him by almost four years and he was nine years older than Guru Harkrishan. Baba Ji was born in a palace called Sheeh Mahal. It is said that this palace was made on the model of Sheesh Mahal of Jaipur and it was father Guru Har Rai's residence.
When Aurangzeb came to the throne, he accused Guru Har Rai of helping Dara Shikoah (Aurangzeb's brother but arch-enemy) and sought Guru Ji appearance in Delhi. Instead, Guru Sahib sent his eldest son, Ram Rai, to Delhi. Ram Rai was well received by Aurangzeb. He not only satisfactorily responded to all charges but also impressed Aurangzeb with his cleverness. As a result, Ram Rai was asked to stay on as a state guest for some period. One day, Aurangzeb questioned (under influence from others), why Sri Guru Nanak had criticized Islam in salok "Mitti Musalman Ki"? Ram Rai satisfied the assembled Muslims by saying that the actual writing is "Mitti Baimaan Ki" and not "musalman ki".
Though Ram Rai was well-blessed with all powers and strictly instructed only to explain Guru's position, he choose to change Sri Guru Nanak's writings which was completely forbidden. Further, he performed miracles for Aurangzeb's pleasures. When Guru Har Rai Ji heard of this incident, he forbids Ram Rai from ever returning home. Guru's word in Gurbani is absolute divine revelation and not subject to any modifications by anyone. Miracles although recognized by Sikh faith, are actively discouraged. Their exposition or display is considered arrogance (competing with Vaaheguru's order).
Though Ram Rai managed to please Aurangzeb, Guru Har Rai Ji forbid all Sikhs from ever associating with Ram Rai. As a consequence Ram Rai obtained some jagir from Aurangzeb and settled north of Harduwar in Duun. He died there in sunmat 1788. Because of Ram Rai's Dehra, Duun came to be popularly known as Dehradun. A historical katha suggests that when Ram Rai was engrossed in meditation, the neighbouring masands mistook him for dead and cremated his body. For this reason, Mata Punjab Kaur sought punishment of masands from Kalgidhur patshah. Today there is a small following of Ram Rai. However, by Guru Har Rai's hukam, all Sikhs are forbidden any association with Ram Rai's followers.
Therefore instead of Ram Rai, Guru Harkrishan was installed as Guru at the tender age of five years and three months at Kiratpur. At the time of installation of Harkrishan as Guru, Ram Rai his elder brother was in the court of Emperor of Delhi. He after learning that Guruship was passed to his younger brother became furious and envious of Guru Harkrishan. He requested the emperor to summon Harkrishan to Delhi and ask him to perform the miracles similar to what he had performed. Ram Rai knew that Guru Harkrishan taken a vow to never appear before the emperor as it was also an order given to him by his father Guru Har Rai.