"Gazikumukh Shamkhalate" is a term introduced in Russian-Dagestan historiography starting from the 1950s–60s to denote the Kumyk state that existed on the territory of present-day Dagestan in the period of the 8th to 17th centuries with the capital in Gazi-Kumukh, and allegedly disintegrated in 1642. However, In the 16th century's Russian archival sources Tarki is stated to be the "capital of Shamkhalate" and "the city of Shamkhal", while "Kazi-Kumuk" is mentioned as a residence. These facts contradict "1642 disintegration" date. Moreover, there is absolutely no source before the 1950s containing the term "Gazikumukh Shamkhalate" or a statement that Gazi-Kumukh had ever been the capital of Shamkhalate. Historically, Shamkhalate is widely described as Tarki Shamkhalate or just Shamkhalate.
Turkic-Tatar version
Among the supporters of Turkic version of the creation of the Shamkhalian state is Lak historian Ali al-Ghumuqi:
Shamkhal wasn't a descendant of Abbas Hamza but a Turk, who came with his companions. After him the Shamkhalate became a hereditary state.
Also it was supported by the historian Fahrettin Kirzioglu, the early 20th century historian D. H. Mamaev, Halim Gerey Sultan, Mehmet-Efendi, and others. Dagestanian historian R. Magomedov stated that:
there is all necessary proofs to relate the term to the Golden Horde, but not to the Arabs. We may think that in the period of the Mongol-Tatars they put a Kumyk ruler in that status [Shamkhal].
Russian professor of oriental studies, the Doctor of Historical Sciences I. Zaytsev, also shared the opinion that the Shamkhalate was a Kumyk state with the capital in the town of Kumuk (written thus in medieval sources). While studying works of the Timurid historians Nizam al-Din Shami and Sharaf al-Din Ali Yazdi, Soviet historians V. Romaskevich and S. Volin, and Uzbek historian Ashraf Ahmedov, as well as professor in Alan studies O. Bubenok, call Gazi-Kumuk (also Gazi-Kumukluk in medieval sources) call the Shamkhalate area as the lands of Kumyks.
Ottoman traveler Evliya Çelebi called the Shamkhal "a natural Oghuz". One of the arguments of the Turkic version is that Shamkhals were elected in the way that is traditional for Turkic peoples — tossing a red apple. Ancient pre-Muslim names of the Kumuk [today Kumukh] inhabitants, as fixed in Khuduk inscription — Budulay, Ahsuwar, Chupan and others — are of Turkic origin. On the graves of the Shamkhals in Kumukh there are Turkic inscriptions, as noted by professor of Caucasian studies L. Lavrov. The grave itself was called by the locals "Semerdalian" after the Khazar city of Semender; the gravestones there are patterned in a Kipchak style. In the "Maza chronicle" Shamkhals are described as "a branch of the Khan-Hakhan generations". Nizam al-Din Shami in his 14th century Timurid chronicle The Book of Triumph and Sheref ad-din 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:
The fact that the ruler in Dagestan was chosen from the Chinghiz dynasty and called shawkhal-khan [sic], derived from the Turkic, Tatar spiritual tradition, as a reliance on their genealogical ancestry (nasab), not paying attention to the science or courtesies (edeb). The house of Chinghiz is highly esteemed amongst them (shawkhals), as Quraysh amongst Muslims. They didn't allow someone to stand higher than them or lift heads.
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.:
The first King of the Western Tatars was Sain. He was strong and mighty. He conquered Russia, Comania, Alania, Lak, Mengiar, Gugia and Khazaria, and before his conquest, they all belonged to Comans.
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:
The people of this province come from Dagestan Tatars, mixed with the Persian settlers; they follow the same [religious] law, and speak [one of the] Lezginian languages.
and
As some Persian sources say, this people settled here under the Abumuselim shah, from the Gilan Province and served under the cleric official kazi, under the rule of Shamkhal. Because of that cleric and the people of Kumukh place, who resettled here from Gilan, or, better said, by the mixture with the indigenous Kumukh people, who originate from Dagestan Tatars, the name Kazikumuk emerged. This clerics were the ancestors of Khamutay [contemporary Khan of Kazikumukh], who following the example of others claimed in their parts independence and in the present times adopted the Khan title.
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 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
In 734 Maslamah ibn Abd al-Malik, the commander of the Arab army, after one of his victories against the Khazars in Dagestan appointed several governors, one of whom was Shakhbal of Kumukh. The authority of Shakhbal could not have been permanent in Kumukh if he was an Arab. It will be correct to assume that Shakhbal was a local ruler of Kumukh who among Laks held the title Shamkhal. He was probably related to the Arabs and his title was distorted in pronunciation. Historians Barthold and Polievktov associated Shakhbal with Shamkhal, both meaning the ruler of Kumukh. Bakikhanov A. K. wrote that in 734: "Abu Muslim advanced to Kumuk ... The main mosque and other buildings built by him in Kumuk still exist today. He left here Shakhbal ibn Abdullah a ruler".
The chronicle Derbent-Nameh gave the following description of the formation of the Dagestani principalities: "Hamri, Kura, Ahti, Rutul, Zeyhur – they are subject to Kumuk ... for the ruler of Derbent [he] ordered to take kharaj from Kaytak, Tabarsaran and Gyubechi ... If against Shakhbal comes any enemy from [the side of] Avar or from the other side, then, when Shakhbal will assemble his troops, let there come to his aid the army of Kaytak with its ruler Hamza and with army of Tabarsaran – Mohammad Masoom and let [them] join the army of Shakhbal". In 734 there were in Dagestan such principalities with their own rulers, as Derbent, Tabasaran, Kaitag, Lak and Avar which remained independent of the Arabs.
Historian Al-Kufi reported that in 738 the Arab commander Marwan ibn Muhammad "moved from Kassak, crossed the river al-Kur and headed for the city called Shaki. From Shaki he went to the land of al-Sarir." In 738 according to Derbent-Nameh, Marwan obliged the rulers of mountainous Dagestan to pay tribute.
Historian Baileys V.M. reported about the campaign of Marwan in Dagestan: "He [Marwan] came to the fortress 'of the throne' killed and captured prisoners. ... He came to Gumik – a fortress where the 'house of possession' was and here the seat of 'the ruler of the throne' was, the ruler left fleeing and arrived at the fortress called Humradzh where the golden throne was. Marwan spent winter and summer near it and then made peace with [Malik] on conditions of [tribute] – a thousand cattle and a hundred thousand Mudd – and then went from there into the land of Tumen."
Juma mosque
In 778 the Juma mosque of Kumukh was built where there is an ancient inscription: "In 162 AH, they built the sacred mosque for the Almighty Allah". This inscription was read by Arabists such as Anuchin D. (1882), D. B. Bushaev (1894), M. Alikhanov-Avar and E. Kazubski (1902).
Collapse of the caliphate
In the 9th century the anti-Arab revolt of Babak Khorramdin and later the Anarchy at Samarra led to the disintegration of the Abbasid Caliphate. Muslim rule in the mountainous Dagestan declined. In the 9th to 11th centuries some territories of southern Dagestan as Tabasaran, Kura, Akhti, Rutul and Tsakhur were under the influence of a stronger Shirvan. The Derbent emirate was formed. Kumukh Shamkhalate consisted of one Lakia.
Historians report that "in the first half of the 10th century Gumik was dependent upon neighboring Serir". Ahmad ibn Rustah wrote in the 10th century that "the king of Serir has a fortress called Alal and Gumik". Al-Masudi wrote in the 10th century that the residents of Gumik are "Christian and not subject to any king, but have chiefs (raissi) and live in peace with the kingdom of Alans". Vladimir Minorsky wrote that in 1064 "the infidels of Gumik attacked the village of al-Bab, killed many Muslims and looted their property then obliged the survivors with kharaj and returned home".
Principalities
Oriental sources reported such names of Dagestani principalities as Derbent, Tabasaran, Gumik, Sarir, Lakz, Haidak, Philan, Shandan, Zirihgeran, Tumen, Djidan, Khamzin, Samandar and Balanjar. Oriental authors have not been to Kumukh and did not mention shamkhal (or utsmi, nutsal, maisum) and their descriptions of Dagestani possessions had distorted character.
Sources
Al-Masudi's report about the Christian population of Gumik in the 10th century may not be reliable as Al-Masudi did not visit Gumik and in his works he could use only reports of the earliest centuries. Reports of eastern authors about Gumik should be related not to the period of their lives but to the time of Arab presence in Dagestan in the 8th century.
Al-Ghumuqi suggested the Seljuk invasion of Dagestan in the beginning of the 12th century that established the authority of shamkhals in Kumukh. Al-Ghumuqi probably had one of the Turkic translations of Derbent-nameh. Referred to therein, Gazi-Qalandar, which means Islamic warlord, must have been the Arab commander Abu Muslim who in the 8th century captured Tabasaran, Kaitag and Kumukh, but decided not to move into Avaria.
History shows that no Arab or Seljuk conquest of mountainous Dagestan took place during the 9th to 12th centuries. In this period there was a long feud that spanned southern Dagestan, Derbent and Shirvan. At the beginning of the 12th century Seljuks were not able to hold on to Shirvan. In 1123 a joint army of Georgians and Shirvanians defeated the Seljuks in the battle of Shamakha. In 1173 Shirvanshah Akhsitan I ibn Minuchihr III in union with Georgia and Byzantium waged a war on Dagestanis, Kipchaks and Russians.
There are no reports from sources that the rulers of Kumukh embraced Islam before the invasion of the Mongol-Tatars in the 13th century. The names of Kumukh rulers appear only after the Mongol invasion. Islamic "Gazi-Kumukh" was first mentioned in the 14th century.