Guru Gobind Singh ( pronunciation (help·info); born Gobind Rai; 22 December 1666 – 7 October 1708) was a spiritual master, warrior, poet and philosopher. He was the last of the 10 Sikh Gurus and succeeded his father Guru Tegh Bahadur as the leader of the Sikhs at the young age of nine. Among his notable contributions toSikhism are the Five Ks, the five articles of faith that Khalsa Sikhs wear at all times, initiating the Sikh Khalsa in 1699, and his contribution to the continual formalisation of the religion which the first Guru Guru Nanak had founded in the 15th century. He was the last of the living Sikh Gurus, passing the Guruship of the Sikhs to the Eleventh and Eternal Sikh Guru, the Guru Granth Sahib Ji.
Gobind Singh’s father Tegh Bahadur founded the city of Anandpur Sahib in the year 1665, on the land purchased from the ruler of Bilaspur (Kahlur). Gobind Singh moved to Anandpur in March 1672. In April 1685, he shifted his residence to Paonta in Sirmaur state at the invitation of Raja Mat Prakash of Sirmaur. According to the gazetteer of the Sirmur State, the Guru was compelled to quit Anandpur Sahib due to differences with Bhim Chand, and went to Toka. From Toka, he was invited toNahan, the capital of Sirmaur by Mat Prakash. From Nahan, he proceeded to Paonta. Mat Prakash invited the Guru to his kingdom in order to strengthen his position against Raja Fateh Shah of Garhwal. At the request of Raja Mat Prakash, the Guru constructed a fort at Paonta with help of his followers, in a short time. The Guru remained at Paonta for around three years, and composed several texts.
The hostility between Nahan King and Fateh Shah, the Garhwal king continued to increase during the latter’s stay at Paonta, ultimately resulting in the Battle of Bhangani near Paonta. Fateh Shah attacked on 18 September 1688; the battle ended with the Guru’s victory. In the Battle of Nadaun in 1687, the armies of Alif Khan and his aides were defeated by the allied forces of Bhim Chand, Guru Gobind Singh and other hill rajas. According to Bichitra Natak and the Bhatt Vahis, Guru Gobind Singh remained at Nadaun, on the banks of the River Beas, for eight days, and visited various important military chiefs. Sometime after the Battle of Bhangani, Rani Champa, the dowager queen of Bilaspur requested the Guru to return to Anandpur Sahib, or Chakk Nanaki, as it was then called, the Guru agreed. He reached Anandpur Sahib in November 1688.
In 1695, Dilawar Khan, the Mughal chief of Lahore, sent his son to attack Anandpur Sahib. The Mughal army was defeated and Hussain Khan was killed. After Hussain’s death, Dilawar Khan sent his men Jujhar Hada and Chandel Rai to Sivalik Hills. However, they were defeated by Gaj Singh of Jaswal. The developments in the hill area caused anxiety to the Mughal emperor Aurangzeb, who sent forces under the command of his son, to restore Mughal authority in the region.