Guru Hargobind's army fought battles with the Mughal armies of Shah Jahan at Amritsar, Kartarpur and elsewhere. Guru Hargobind defeated the Mughal troops near Amritsar in the Battle of Amritsar in 1634. The Guru was again attacked by a provincial detachment of Mughals, but the attackers were routed and their leaders slain. Guru Hargobind also led his armies against the provincial Muslim governors. The Guru anticipated the return of a larger Mughal force, so retreated into Shivalik Hills to strengthen his defenses and army, with a base in Kiratpur where he continued to stay till his death.