Ranjit Singh's fame grew in 1797, at age 17, when the Afghan Muslim ruler Shah Zaman, of the Ahmad Shah Abdali dynasty, attempted to annex Panjab region into his control through his general Shahanchi Khan and 12,000 Soldiers. The battle was fought in the territory that fell in Ranjit Singh controlled misl, whose regional knowledge and warrior expertise helped resist the invading army. This victory gained him recognition. In 1798, the Afghan ruler sent in another army, which Ranjit Singh did not resist. He let them enter Lahore, then encircled them with his army, blocked off all food and supplies, burnt all crops and food sources that could have supported the Afghan army. Much of the Afghan army retreated back to Afghanistan.