Guru Tegh Bahadur, was executed by Aurangzeb, Guru Gobind Singh was formally installed as the leader of the Sikhs at the age of nine, becoming the tenth and final human Sikh Guru.
After Aurangzeb's death, Guru Gobind Singh no longer remained an adversary to the Mughals. ... Guru Gobind Singh named Guru Granth Sahib, the religious text of the Khalsas and the Sikhs, as the next Guru of the two communities. He left his bodily form and on October 7 in 1708.