In 1699, the Khalsa was founded by Guru Gobind Singh, the last guru. A former ascetic was charged by Gobind Singh with the duty of punishing those who had persecuted the Sikhs. After the guru's death, Baba Banda Singh Bahadur became the leader of the Sikh army and was responsible for several attacks on the Mughal empire.