Sri Muktsar Sahib City, the district headquarters of Sri Muktsar Sahib District is a historical city. It is intimately connected with Sikh religion. Guru Gobind Singh Ji fought his last battle against Mughals in 1705 A.D. at Sri Muktsar Sahib. During fighting, 40 disciples of Guru Ji known as ’40 Muktas'(40 liberated ones) sacrificed their lives. These 40 Sikhs were those who insisted that Guru Ji should leave the Anandpur Sahib fort, when it was besieged by Mughal army. Guru Ji had than asked these followers to leave him if they so desired but they should give him in written that he is not their guru and they are not his Sikh i.e. followers.These skihs were not welcomed by family members as they had left the Guru at time of trouble. They were overcome by shame and not in a position to face Guru Gobind Singh Ji again.On learning that Guru Ji was in region of present Sri Muktsar Sahib the 40 Sikhs lead by Bhai Mahan Singh and accompanied by Mai Bhago, an illustrious woman in Sikh history left their homes to help him. At that time Mughal army was searching for Guru ji. A pitched battle was fought near a pond called Khidrane di Dhab. The 40 sikhs fought valiantly for guru ji and achieved martyrdom. The outcome was in favour of Sikhs. Mughal forces failed in capturing or harming Guru Sahib and fled from battlefield. After the battle was over, Guru Ji visited the battlefield. One of the 40 Sikhs, Sardar Mahan Singh was about to die, Guru Ji took his head in his arms and asked what did he want? Sardar Mahan Singh requested Guru Ji to tear the paper (Bedawa), they had given to him at Anandpur Sahib ‘you are not our guru and we are not your followers’. On this Guru Ji tore the bedawa. These 40 Sikhs were henceforth called 40 Muktas. The city that grew at the site of the battle was called Sri Muktsar Sahib after them. MelaMaghi, a famous fair of Punjab, is celebrated at Sri Muktsar Sahib on next day after Lohri every year as a tribute to those 40 Sri Muktsar Sahibs.