Hargobind fought intermittently with Mughal forces in the Punjab. Following four such skirmishes, he withdrew from Amritsar and occupied Kiratpur in the foothills of the Shiwalik Hills. This was a much more suitable position because it was outside the territory directly controlled by the Mughal administration. There he remained until his death in 1644.
Before he died, the question of who should succeed him emerged. Although it was certain that the successor should be a descendant of his, it was far from clear which of his children or grandchildren should take his place. Hargobind had three wives who bore him six children. The eldest son, Gurditta, who was evidently his favourite for the position, had predeceased him, and none of the remaining five seemed suitable for the position. The older son of Gurditta, Dhir Mal, was rejected because, from his seat in Jalandhar district, he had formed an alliance with Emperor Shāh Jahān. This meant that the younger son of Gurditta, Har Rai, would become the seventh Guru. But Dhir Mal continued to make trouble for the orthodox Panth and attracted many Sikhs as his followers. He also claimed to possess the sacred scripture prepared by Guru Arjan and used it to buttress his claims to be the only legitimate Guru. Guru Har Rai
The period of Guru Har Rai (1630–61) was a relatively peaceful one. He withdrew from Kiratpur and moved farther back into the Shiwalik Hills, settling with a small retinue at Sirmur. From there he occasionally emerged onto the plains of the Punjab to visit and preach to the Sikhs. In this regard he was well served by several masands, who brought him news about the Sikhs and offerings of money to pay the expenses of the Panth.
The period of peace did not last, however. Guru Har Rai faced the same problems with the Mughals as Guru Arjan had. Aurangzeb, the successful contender for the Mughal throne, defeated his elder brother Dara Shikoh and established himself in Delhi. He then sent a message to Har Rai requiring him to deliver his son Ram Rai as a hostage for Har Rai’s reputed support of Dara Shikoh. Aurangzeb evidently wished to educate the future Guru in Mughal ways and to convert him into a supporter of the Mughal throne. In an episode that illustrated the success of this quest, Aurangzeb once asked Ram Rai to explain an apparently demeaning line in the Adi Granth, which claimed that earthenware pots were mitti musalaman ki, or formed from deceased Muslim bodies. Ram Rai replied that the words had been miscopied. The original text should have been mitti beiman ki, the dust that is formed from the bodies of faithless people. When this answer was reported to Har Rai, he declared his intention never to see Ram Rai again. Because he had committed the serious crime of altering the words of Guru Nanak, Ram Rai could never be the Guru, and the position passed instead to his younger brother, Hari Krishen, who inherited the title when he was only five years old. Guru Hari Krishen
Aurangzeb summoned Guru Hari Krishen (1656–64) to Delhi from the Shiwalik Hills. While in Delhi, Hari Krishen contracted smallpox, which proved fatal. Before he died, he uttered the words “Baba Bakale,” which indicated to his followers the identity of his successor, the baba (“old man”) who is in the village of Bakala. Hari Krishen meant to identify Tegh Bahadur, who dwelt in Bakala and was the son of Guru Hargobind by his second wife and the half brother of Guru Hari Krishen’s grandfather.
Sikhism: Gurudwara Bangla SahibThe Gurudwara Bangla Sahib, a Sikh house of worship dedicated to the eighth Sikh Guru, Hari Krishen, in Delhi.Ken Wieland (CC-BY-2.0) (A Britannica Publishing Partner) Guru Tegh Bahadur
As soon as these words became known, many hopeful persons rushed to Bakala to claim the title. Sikh tradition records that Makhan Shah, a trader, had been caught by a violent storm at sea and in his distress vowed to give the Sikh Guru 501 gold mohurs (coins) if he should be spared. After the storm abated, the survivor traveled to the Punjab, and, learning that the Guru resided in Bakala, he proceeded there. He discovered that several people claimed the title following the death of Guru Hari Krishen. He decided to test them all, laying before each claimant two gold mohurs. Finally he reached Tegh Bahadur, who asked him for the remainder of what he had promised. Rushing up to the rooftop, Makhan Shah proclaimed that he had indeed found the true Guru.
The period of Guru Tegh Bahadur (1621–75) is important for two reasons. The first is that several hymns that Tegh Bahadur wrote were added by Guru Gobind Singh to the collection originally made by Guru Arjan; the canon was then closed, and the Adi Granth has remained inviolable ever since. The second concerns the manner of Tegh Bahadur’s death. Sikh tradition maintains that he was arrested by Mughal authorities for having aided Kashmiri Brahmans against Mughal attempts to convert them to Islam. Offered the choice of conversion or death, he chose the latter and was immediately beheaded.
A Sikh who witnessed the execution spirited away Tegh Bahadur’s headless body and lodged it in his house outside Delhi. To cremate the body without raising suspicion, he burned the whole house. Meanwhile, three outcaste Sikhs secured the head of the Guru and carried it in secret up to Anandpur, a service which earned them and all their successors the right to be called Ranghreta Sikhs, an honoured group of outcaste followers of the Guru. Arriving in Anandpur, they produced the severed head amidst cries of great lamentation. Guru Gobind Singh and the founding of the Khalsa
Following the death of Tegh Bahadur, Guru Gobind Singh (1666–1708), the most important of all the Gurus with the exception of Guru Nanak, assumed leadership of the Sikhs. Gobind Rai, whose name was altered to Gobind Singh possibly at the time of the creation of the Khalsa, was born in Patna, the only child of Guru Tegh Bahadur. At the age of five he was brought to Anandpur and educated in Sanskrit and Persian and in the arts of poetry and warfare. His father’s execution in Delhi by Aurangzeb must have made a deep impression on the child. For several years after his succession as Guru, he continued his education in the Shiwalik Hills. He grew to manhood as the ruler of a small Shiwalik state, participating in various wars against other Shiwalik chieftains and demonstrating a particular delight in the sport of hunting.
According to Sikh tradition, on Baisakhi Day (the Indian New Year) late in the 17th century (the exact year is uncertain, though it was probably 1699), a fair was held at Anandpur, and all Sikhs were ordered to attend. The Guru remained concealed until the celebrations were at their height, when he suddenly appeared from a tent carrying a drawn sword and demanding the head of one of his loyal followers. At once the crowd became silent, wondering what had happened. The Guru repeated the command, and eventually Daya Singh volunteered and was taken behind a screen to be dispatched. Gobind Singh then reappeared, his sword dripping blood, and demanded a second victim. He too was escorted behind the screen, and again the sound of the sword could be heard. In this manner five loyal Sikhs agreed to die for their master. When he had apparently dispatched the fifth, the screen was removed, and all five were seen to be very much alive. At their feet lay five slaughtered goats. The five volunteers became the Panj Piare, the “Cherished Five,” who had proved that their loyalty was beyond question.