In 1705 CE, forces under Guru Gobind Singh fought a Mughal army at Khidrana, a site in present day Punjab, in what became the final major battle of the Guru's military campaigns against Mughal authority. The battle followed a period of severe hardship for the Guru's forces, during which a group of Sikhs, exhausted by the prolonged conflict, had earlier signed a document formally renouncing their allegiance to him and departed.
According to Sikh tradition, when these same men learned that the Guru's forces faced a renewed Mughal assault at Khidrana, they returned to fight alongside him after all, led in part by a woman named Mai Bhago, who is remembered in Sikh history for rallying and leading them back into battle. The returning group fought and, according to tradition, died in the ensuing battle, having reversed their earlier renunciation through their final act of loyalty and sacrifice.
Guru Gobind Singh is said to have personally torn up the document renouncing their allegiance upon learning of their return and sacrifice, restoring their standing within the Sikh community posthumously and ensuring they would be remembered with honor rather than as deserters.
The battle came at the close of a difficult year for Guru Gobind Singh's forces, following the prolonged siege and contested withdrawal from Anandpur Sahib earlier in 1704, in which the Guru lost two of his sons in the fighting that followed. Muktsar was the last major engagement of this campaign, after which direct military confrontation between the Guru's forces and Mughal authority in the Punjab largely subsided.