In 1761, following the victory at the Third battle of Panipat between the Durrani and the Maratha Empire, Ahmad Shah Abdali captured remnants of the Maratha Empire in Punjab and Kashmir regions and had consolidated control over them.