Guru Gobind Singh establishes the Khalsa in Anandpur Sahib, Punjab.

Khalsa (Punjabi: , Punjabi pronunciation: [xalsa], lit.'to be pure' or 'to be clear' or 'to be free from' or 'to be liberated') refers to both a community that considers Sikhism as its faith, as well as a special group of initiated Sikhs. The Khalsa tradition was initiated in 1699 by the Tenth Guru of Sikhism, Guru Gobind Singh. Its formation was a key event in the history of Sikhism. The founding of Khalsa is celebrated by Sikhs during the festival of Vaisakhi.Guru Gobind Singh started the Khalsa tradition after his father, Guru Tegh Bahadur, was beheaded during the Islamic sharia rule of the Mughal Emperor Aurangzeb. Guru Gobind Singh created and initiated the Khalsa as a warrior with a duty to protect the innocent from Islamic religious persecution. The founding of the Khalsa started a new phase in the Sikh tradition. It formulated an initiation ceremony (amrit sanskar, nectar ceremony) and rules of conduct for the Khalsa warriors. It created a new institution for the temporal leadership of the Sikhs, replacing the earlier masand system. Additionally, the Khalsa provided a political and religious vision for the Sikh community.:127Upon initiation, a Khalsa Sikh was given the titles of Singh (male) meaning "lion" and Kaur (female) meaning "princess". The rules of life, included behavioral code (Rahit, such as no tobacco, no intoxicants, no adultery, no Kutha meat), no modification of hair on the body, and a dress code (Five Ks).:121126

Guru Gobind Singh (Punjabi pronunciation: [gʊɾuː goːbɪn̯d̯ᵊ sɪ́ŋgᵊ]; 22 December 1666 – 7 October 1708), born Gobind Rai, was the tenth Sikh Guru, a spiritual master, warrior, poet and philosopher. When his father, 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. His four biological sons died during his lifetime – two in battle, two executed by the Mughal governor Wazir Kahn.Among his notable contributions to Sikhism are founding the Sikh warrior community called Khalsa in 1699 and introducing the Five Ks, the five articles of faith that Khalsa Sikhs wear at all times. Guru Gobind Singh is credited with the Dasam Granth whose hymns are a sacred part of Sikh prayers and Khalsa rituals. He is also credited as the one who finalized and enshrined the Guru Granth Sahib as Sikhism's primary scripture and eternal Guru.