Sikhism achieved a series of military victories and created a Sikh Empire in 1799. The Sikh empire had its capital in Lahore, spread over almost comprising what is now northwestern Indian subcontinent. The Sikh Empire entered into a treaty with the colonial British powers, with each side recognizing Sutlej River as the line of control and agreeing not to invade the other side. Ranjit Singh's most lasting legacy was the restoration and expansion of the Harmandir Sahib, most revered Gurudwara of the Sikhs, with marble and gold, from which the popular name of the "Golden Temple" is derived. After the death
Sikh holocaust of 1762 Baba Deep Singh still pressed on in his determination to reach the holy shrine, until he made the precincts of the Harmandir Sahib. It was Baba Deep Singh's headless body holding his head on his left hand and wielding his great sword in his right that had fought on until he redeemed his pledge to reach the holy temple. When Ahmad Shah Durrani returned for his sixth campaign of conquest (his fifth being in 1759–1761), Sikh fighters were residing in the town of Jandiala, east of Amritsar. The place was the home of Aqil, the head of the Nirinjania sect,