Hargobind gave the doctrine practical force. He raised a body of horsemen, fortified Amritsar with the stronghold of Lohgarh, and accepted gifts of arms and mounts from his followers, transforming the Panth into a community able to defend itself. He was for a time imprisoned by Jahangir at the fortress of Gwalior; his release, and, in the tradition, his insistence that a number of imprisoned Hindu princes be freed with him, is commemorated as Bandi Chhor Divas, the "day of liberation," which Sikhs observe around the time of Diwali.
Under the succeeding emperor Shah Jahan relations broke into open conflict, and Hargobind fought several defensive engagements against Mughal forces, at Amritsar, Kartarpur and elsewhere. Late in life he withdrew to Kiratpur in the Shivalik hills, beyond the immediate reach of the imperial power, and there arranged that the Guruship pass to his grandson. Under him the community first bore arms, not as conquest but, in its own understanding, as the defence of a faith the state had shown it would strike.