in which they might find refuge from you." Bosworth states that this campaign may have actually taken place in Guzgan or Bamiyan rather than the purely-Iranian Ghur. He also states that no doubt further sporadic raids continued throughout the Umayyad rule, though not noted by historians. It is known that Nasr ibn Sayyar's commander Sulaiman b. Sul had raided Gharchistan and Ghur some time before 739 AD. 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. No permanent control was ever established on Ghur. According to Bosworth, its value was only for its slaves which could best be obtained in occasional temporary raids. Arab and Persian geographers never considered it important. In all sources it is cited as supplying slaves to slave markets in Khorasan, indicating it had a mostly "infidel" population. Istakhari called it a land of infidels (dar al-kufr) annexed to Islamic domain because of its Muslim minority. However Hudud al-'Alam stated it had a mostly-Muslim population. Ghazni The pre-Ghaznavid royal dynasty of Ghazni were the Lawiks. Afghan historian 'Abd al-Hayy Habibi Qandahari, who in 1957 examined a manuscript containing tales about miracles (karamat) of Shaikh Sakhi Surur of Multan, who lived in the 12th century, concluded it dated to 1500. He recorded one of its anecdotes which records the history of Ghazni by the Indian traditionalist and lexicographer Radi ad-Din Hasan b. Muhammad al-Saghani (died 1252) from Abu Hamid az-Zawuli. According to it, a great mosque at Ghazni was earlier a great idol-temple built in honor of the Rutbils and Kabul-Shahs by Wujwir Lawik. His son Khanan converted to Islam and was sent a poem by the Kabul-Shah saying, "Alas! The idol of Lawik has been interred beneath the earth of Ghazni, and the Lawiyan family have given away [the embodiment of] their kingly power. I am going to send my own army; do not yourself follow the same way of the