 In 964 AD, the last Mohyal Shahi was succeeded by the Janjua overlord, Jayapala, of the Panduvanshi dynasty.The last Shahi emperors Jayapala, Anandapala and Tirlochanpala fought the Muslim Ghaznavids of Ghazna and were gradually defeated.Their remaining army were eventually exiled into northern India.