The early history of Ghor is unclear. Minhaj-i-Siraj in Tabaqat-i-Nasiri states that Shansab, who established the Ghurid dynasty, was converted by the Arab Caliph Ali which Mohammad Habib and K. A. Nizami dismissed as unlikely. He further adds that the Ghurid Amir Faulad assisted Abu Muslim in overthrowing the Umayyads during the Abbasid Revolution. He also recounts a legend about a dispute between two prominent families of the area. They sought the intercession of the Abbasids and the ancestor of the Shansabi family, Amir Banji, was subsequently confirmed as the ruler by Harun al-Rashid.
Alp-Tegin proceeded with his small force of ghulams and ghazis (200 ghulams and 800 ghazis according to Siyasatnama, while Majma al-ansab of Muhammad b. Ali al-Shabankara'i (d. 1358) states 700 ghulams and 2,500 Tajiks). En route, he subdued the Iranian Sher of Bamiyan and the Hindu-Shahi king of Kabul. He then came to Ghazni, whose citadel he besieged for four months and wrested the town from its ruler, Abu 'Ali or Abu Bakr Lawik or Anuk. The origin of this chief was Turkic, though it is not known if he was a Samanid vassal or an independent ruler. Josef Markwart suggests he was a late representative of the Zunbils. The Lawik dynasty of Ghazni was linked to the Hindu Shahi dynasty through marriage. Alp-Tegin was accompanied by Sabuktigin during the conquest of Ghazni.
The conquest does not seem to have had a lasting effect, as Henry George Raverty mentions that Kafirs still lived in upper part of Alishang and Tagau. Khulasat al-ansab of Hafiz Rahmat Khan stated that the Afghans and Kafirs of Lamghan were still fighting each other during the time of Jahangir. 2b1af7f3a8