Dal Khalsa was the name of the Sikh army that operated in the 18th century (1747–1780) in the Punjab region.
The religion of Sikhism began at the time of the Conquest of Northern India by Babur. His grandson, Akbar, supported religious freedom and after visiting the langar of Guru Amar Das had a favorable impression of Sikhism. As a result of his visit he donated land to the langar and had a positive relationship with the Sikh gurus until his death in 1605. His successor, Jahangir, saw the Sikhs as a political threat. He arrested Guru Arjun Dev because of Sikh support for Khusrau Mirza and ordered him to be put to death by torture. Guru Arjan Dev's martyrdom led the sixth Guru, Guru Har Gobind, to declare Sikh sovereignty in the creation of the Akal Takht and to establish a fort to defend Amritsar.Jahangir attempted to assert authority over the Sikh by jailing Guru Har Gobind at Gwalior and released him after a number of years when he no longer felt threatened. Sikhism did not have any further issues with the Mughal Empire until the death of Jahangir in 1627. His successor, Shah Jahan "took offense" at Guru Har Gobind's sovereignty and after a series of assaults on Amritsar forced the Sikhs to retreat to the Sivalik Hills. Guru Har Gobind's successor, Guru Har Rai maintained the guruship in the Sivalik Hills by defeating local attempts to seize Sikh land and taking a neutral role in the power struggle between Aurangzeb and Dara Shikoh for control of the Timurid dynasty. The ninth Guru, Guru Tegh Bahadur, moved the Sikh community to Anandpur and traveled extensively to visit and preach in Sikh communities in defiance of Aurangzeb, who attempted to install Ram Rai to the guruship. He aided Kashmiri Brahmins in avoiding conversion to Islam and was arrested and confronted by Aurangzeb. When offered a choice between conversion or death, he chose to die rather than compromise his principles and was executed.Guru Gobind Singh, assumed the guruship in 1675 and to avoid battles with Sivalik Hill Rajas moved the gurship to Paunta. He built a large fort to protect the city and garrisoned an army to protect it. The growing power of the Sikh community alarmed Sivalik Hill Rajas who attempted to attack the city but the Guru's forces routed them at the Battle of Bhangani. He moved on to Anandpur and established the Khalsa, a collective army of baptized Sikhs, on March 30, 1699. The establishment of the Khalsa united the Sikh community against various Mughal-backed claimants to the guruship. In 1701, a combined army composed of the Sivalik Hill Rajas and the Mughal army under Wazir Khan attacked Anandpur and, following a retreat by the Khalsa, were defeated by the Khalsa at the Battle of Muktsar. In 1707, Guru Gobind Singh accepted an invitation by Bahadur Shah I, Aurangzeb's successor to meet in southern India. When he arrived in Nanded in 1708, he was injured by agents of Wazir Khan, the governor of Sirhind. After this incident his wounds were stitched and he began to recover. A few days after, some Sikhs brought a very stiff bow to present to Guru Gobind Singh. As they were discussing whether anybody would ever be able to put a string on the bow, Guru Gobind Singh accepted the challenge. Though the bow was stringed, due to the force he applied on the bow the wounds which were still fresh started bleeding profusely. Guru Gobind Singh then declared that he would be leaving for heavenly abode and asked his Sikhs to prepare for the cremation.