The history of Sikhism started with Nanak, the first Guru in the fifteenth century in the Punjab region of the Indian subcontinent. The religious practices were formalised by Guru Gobind Singh on 30 March 1699. The latter baptised five persons from different social backgrounds to form Khalsa (ਖ਼ਾਲਸਾ). The first five, Pure Ones, then baptised Gobind Singh into the Khalsa fold. This gives the order of Khalsa, a history of around 300 years.
The history of Sikhism is closely associated with the history of Punjab and the socio-political situation in 16th-century Northwestern Indian subcontinent (modern Pakistan and India). During the Mughal rule of India (1556–1707), Sikhism was in conflict with the Islamic administration, while it cherished saints from Hinduism and Islam. Prominent Sikh Gurus were killed by Islamic rulers for refusing to convert to Islam, and for opposing the persecution of Sikhs and Hindus. Subsequently, Sikhism militarised to oppose Mughal hegemony. The emergence of the Sikh Confederacy under the misls and Sikh Empire under reign of the Maharajah Ranjit Singh was characterised by religious tolerance and pluralism with Christians, Muslims and Hindus in positions of power. The establishment of the Sikh Empire is commonly considered the zenith of Sikhism at political level, during this time the Sikh Empire came to include Kashmir, Ladakh, and Peshawar. Hari Singh Nalwa, the Commander-in-chief of the Sikh army along the North West Frontier, took the boundary of the Sikh Empire to the very mouth of the Khyber Pass. The Empire's secular administration integrated innovative military, economic and governmental reforms.