Yezdi mentioned the land as Gazi-Kumukluk, where the suffix "luk" suffi is a Turkic linguistic sign. The ruler of Andi people Ali-Beg, who founded a new ruling dynasty, also had a title of "Shamkhal". According to the local story, starting from Ali-Beg until Khadjik, the rulers of their land spoke in the "language of the plains", i.e. Kumyk. Jamalutdin-haji Mamaev in the beginning of the 20th century wrote: According to French historian Chantal Lemercier-Quelquejay, Shamkhalate was dominated by the Turkic Kumyks, and the Lak people hold the honorable title of Gazis (because of the earlier adoption of Islam). Apart from that, the Shamkhalate had a feudal class of Karachi-beks, a title exclusively related to Mongol-Turkic states. Piano Karpini mentioned from his travels that Khazaria and Lak, even before falling in the hands of the "Western Tatars", belonged to the Cumans.: Vasily Bartold also stated that the Arabic version is a compilation by local historians trying to merge legends with history. The original population of the "Kazi-Kumykskiy" possession, as wrote F. Somonovich in 1796, were Dagestan Tatars (Kumyks). After the resettlement of some Lezginian peoples from Gilan province of Persia, under the rule of Shamkhal, the population mixed, and the power of Shamkhal decreased, and the new population formed their own Khanate independent of the Shamkhal dynasty: and Critics of the Arabic version V. Bartold also stated, that the term "Shamkhal" is a later form of the original form Shawkhal, which is mentioned both in the Russian and Persian (Nizam al-Din Shami and Sharaf al-Din Ali Yazdi) sources. Dagestani historian Shikhsaidov wrote that the version claiming Arab descent was in favor of the dynasty and clerics (the descendants of the Prophet Muhammad). A. Kandaurov wrote that the Arab version was elaborated by the Shamkhals themselves. Also, the title Shamkhals is not mentioned in the works of the Medieval Arabic historians and geographers. Arabs in Kumukh In the middle of the 7th century the Rashidun Caliphate, in its expansion to the north, engaged in the conquest of Dagestan. At the beginning of the 8th century the Arabs captured Kumukh, a fact that could have obliged Laks to be in alliance with the Arabs against the Khazars. It is known that the Arabs lost power in Dagestan on successful Khazars invasion and Laks then could have been in alliance with the Khazars. Arabs had to reconquer Dagestan. Campaigns of Maslamah and Marwan II