Contents

Large parts of Dagestan had been part of the Iranian Safavid Empire since the 16h century. At the beginning of the 18th century, following the slow disintegration of the Safavid state, there were uprisings in the Northeast Caucasus against the Persian rule. The Russian and Ottoman Empire, both imperial rivals of the Persians, made usage of this. In 1722, Peter the Great declared war on Persia and started the Russo-Persian War of 1722-1723. This was the first time the Russians made an expedition for the capture of Derbent and beyond down the Caucasus. During and before the occupation of Derbent by Peter I, the naib of city was Imam Quli Khan and was naturally a Shiite like the rest of the Safavid Empire.[6][7] He proposed the Russian emperor the keys to the city gates.

Peter I reappointed Imam Quli Khan as the head of Derbent and its "native" troops by assigning him the rank of Major-General. In September 1723 following the Russo-Persian War (1722-1723) and the outcoming Treaty of Saint Petersburg, the Safavid Shah Sultan Husayn, whose empire was for years already in dissaray and crumbling, was forced to cede Derbent alongside the many other Iranian territories in the Caucasus.[8] However, some years later in connection with the aggravation of Russian-Turkish relations, and the new rise of Persia now led by the brilliant military general Nader Shah, Russia found itself forced to cede all territories back by March 1735 in the Treaty of Ganja in order to deter itself from a costly war against Persia, and also to construct an alliance against the common neighboring foe; Ottoman Turkey.[9] Most of the other territories were already given back in the Treaty of Resht in 1732 as part of the same reasons.[10]

After the death of Nader Shah in 1747 his huge empire disintegrated and the former Persian provinces in the Caucasus (velayats), formed two dozen khanates with various forms of autonomy, one of which was newly formed the Derbent Khanate.[11] Starting from 1747 with the title of Khan, the first ruler of the Derbent Khanate became the son of Imam Kuli Khan - Muhammad Hassan (also mentioned as Magomed-Hussein or Mohammed Hussein).[6]

After the death of Fatali Khan, his short lived quasi-independent rule collapsed. His successor, Ahmed Khan, ruled for only two years and died in March 1791 after whom the new khan of Quba became his brother Sheikh Ali Khan. As a result of dissatisfaction with the policies Sheikh Ali Khan, Derbent once again became an independent khanate, which in May 1799 received its own khan again, and this was the youngest son of Fatali Khan, named Hasan Aga.[14] In 1802 and Hasan Khan died and Sheikh Ali Khan resubjugated the possession of Derbent to the Quba Khanate.[14]

The territory of the Derbent khanate extended south from the possession of the Utsmi of the Qaytaq, to the foothills of the Tabasaran Principality to the west, and north-eastern borders of the Quba khanate to the south.[17]

Russian historian Semyon Mikhailovich Bronevsky, who visited the Caucasus at the end of the 18th century, wrote about Derbent:

In 1796, there are 2,189 houses, one of them which is a mint, 450 shops, 15 mosques, 6 caravanserais, 30 silk factories, 113 paper mills, 50 different artisan shops, residents of both sexes are a small 10,000, all of which adhere to the Shia sect and for the most part are Persians, and, except for a number of Armenian, all here speak and write Persian..[18]

Furthermore, he said that:

Among the other residents their numbers do not exceed 2,000. They originally come from Persia such as the Shahsevan and Tarakama, were anciently transferred to Dagestan, settled in 17 villages, and are kept part of the Shia sect as well. They speak a "Tatar dialect".(Azerbaijani) They are diligent farmers, make some kind of bread, cotton, saffron, practice sericulture, and contribute to the city's natural resources it needs, such as wood, coal and food supplies. Their land rife with all supplies, meadows, forests and waters. Mountain peoples violate their peace with their raids, which however they are able to reflect on the nature as they are brave and are always armed due to caution. All residents of the Derbent khante altogether with the city included can not put more than around four thousand armed men, mostly cavalry, who are revered in Derbent to be the best.::

^Homa Katouzian, "Iranian history and politics", Published by Routledge, 2003. pg 128: "Indeed, since the formation of the Ghaznavids state in the tenth century until the fall of Qajars at the beginning of the twentieth century, most parts of the Iranian cultural regions were ruled by Turkic-speaking dynasties most of the time. At the same time, the official language was Persian, the court literature was in Persian, and most of the chancellors, ministers, and mandarins were Persian speakers of the highest learning and ability"

^Tadeusz Swietochowski. Russian Azerbaijan, 1905—1920: The Shaping of National Identity in a Muslim Community. Cambridge, UK, Cambridge University Press, 2004.