Saffarid dynasty
Mahmud initiated the first of numerous invasions of North India. On 28November 1001, his army fought and defeated the army of Raja Jayapala of the Kabul Shahis at the Battle of Peshawar. In 1002 Mahmud invaded Sistan and dethroned Khalaf ibn Ahmad, ending the Saffarid dynasty. From there he decided to focus on Hindustan to the southeast, particularly the highly fertile lands of the Punjab region.