Derbent is a city in the Republic of Dagestan, Russia, located on the Caspian Sea, north of the Azerbaijani border. It is the southernmost city in Russia, and it is the second-most important city of Dagestan.
Derbent occupies the narrow gateway between the Caspian Sea and the Caucasus Mountains connecting the Eurasian steppes to the north and the Iranian Plateau to the south.
Derbent claims to be the oldest city in Russia with historical documentation dating to the 8th century BCE. Due to its strategic location, over the course of history, the city changed ownership many times, particularly among the Persian, Arab, Mongol, Timurid, Shirvan and Iranian kingdoms. In the 19th century, the city passed from Iranian into Russian hands by the 1813 Treaty of Gulistan.
Derbent's location on a narrow, three-kilometer strip of land in the North Caucasus between the Caspian Sea and the Caucasus mountains is strategic in the entire Caucasus region. Historically, this position allowed the rulers of Derbent to control land traffic between the Eurasian Steppe and the Middle East. The only other practicable crossing of the Caucasus ridge was over the Darial Gorge.
A traditionally and historically Iranian city, the first intensive settlement in the Derbent area dates from the 8th century BC, the site was intermittently controlled by the Persian monarchs, starting from the 6th century BC. Until the 4th century AD, it was part of Caucasian Albania which was a satrap of the Achaemenid Persian Empire, and is traditionally identified with Albana, the capital. The modern name is a Persian word meaning "gateway", which came into use in the end of the 5th or the beginning of the 6th century AD, when the city was re-established by Kavadh I of the Sassanid dynasty of Persia, however, Derbent was probably already into the Sasanian sphere of influence as a result of the victory over the Parthians and the conquest of Caucasian Albania by Shapur I, the second shah of the Sassanid Persians. In the 5th century Derbent also functioned as a border fortress and the seat of a Sassanid marzban.
The 20-meter-high walls with thirty north-looking towers are believed to belong to the time of Kavadh's son, Khosrau I, who also directed the construction of Derbent's fortress.
The Sassanid fortress does not exist any more, as the famous Derbent fortress as it stands today was built from the 12th century onward. Some say that the level of the Caspian was formerly higher and that the lowering of the water level opened an invasion route that had to be fortified. Derbent became a strong military outpost and harbour of the Sassanid empire. During the 5th and 6th centuries, Derbent also became an important center for spreading the Christian faith in the Caucasus.
During periods when the Sasanians were distracted by war with the Byzantines or protracted battles with the Hephthalites in the eastern provinces, the northern tribes succeeded in advancing into the Caucasus. The first Sasanian attempt to seal off the road along the Caspian seacoast at Darband by means of a mud-brick wall has been dated in the reign of Yazdegerd II (438–457 AD).
Movses Kagankatvatsi left a graphic description of the sack of Derbent by the hordes of Tong Yabghu of the Western Turkic Khaganate in 627. His successor, Bori Shad, proved unable to consolidate Tong Yabghu's conquests, and the city was retaken by the Persians, who held it as an integral domain until the Muslim Arab conquest.
As mentioned by the Encyclopedia Iranica, ancient Iranian language elements were absorbed into the everyday speech of the population of Dagestan and Derbent especially during the Sassanian era, and many remain current. In fact, a deliberate policy of “Persianizing” Derbent and the eastern Caucasus in general can be traced over many centuries, from Khosrow I to the Safavid shahs Ismail I, and Abbas the Great. According to the account in the later "Darband-nama", after construction of the fortifications Khosrow I “moved much folk here from Persia”, relocating about 3,000 families from the interior of Persia in the city of Derbent and neighboring villages. This account seems to be corroborated by the Spanish Arab Ḥamid Moḥammad Garnaṭi, who reported in 1130 that Derbent was populated by many ethnic groups, including a large Persian-speaking population.
In 654, Derbent was captured by the Arabs, who called it the Gate of Gates, following their invasion of Persia. They transformed it into an important administrative center and introduced Islam to the area. The impression of antiquity evoked by these fortifications led many Arab historians to connect them with Khosrow I and to include them among the seven wonders of the world. The Darband fortress was certainly the most prominent Sasanian defensive construction in the Caucasus and could have been erected only by an extremely powerful central government. Because of its strategic position on the northern branch of the Silk Route, the fortress was contested by the Khazars in the course of the Khazar-Arab Wars. The Sassanids had also brought Armenians from Syunik to help protect the pass from invaders; as Arab rule weakened in the region at the end of the ninth century, the Armenians living there were able to establish a kingdom, which lasted until the early years of the thirteenth century.
Excavations on the eastern side of the Caspian Sea, opposite to Derbent, revealed the Great Wall of Gorgan, the eastern counterpart to the wall and fortifications of Derbent. Similar Sassanian defensive fortifications there - massive forts, garrison towns, long walls - also run from the sea to the mountains.
The Caliph Harun al-Rashid lived in Derbent and brought it into great repute as a seat of the arts and commerce. According to Arab historians, Derbent, with population exceeding 50,000, was the largest city of the 9th century Caucasus. In the 10th century, with the collapse of the Arab Caliphate, Derbent became the capital of an emirate. This emirate often fought losing wars with the neighboring Christian state of Sarir, allowing Sarir to manipulate Derbent's politics on occasion. Despite that, the emirate outlived its rival and continued to flourish at the time of the Mongol invasion in 1239. In the 14th century, Derbent was occupied by Timur's armies.
The Shirvanshahs dynasty existed as independent or a vassal state, from 861 until 1538, longer than any other dynasty in the Islamic world. They were renowned for their cultural achievements and geopolitical pursuits. The rulers of Shirvan, called the Shirvanshahs, had attempted, and on numerous times, succeeded, to conquer Derbend since the 18th Shirvanshah king, Afridun I, was appointed as the governor of the city. Over the centuries the city changed hands often. The 21st Shirvanshah king, Akhsitan I, briefly reconquered the city. However, the city was lost once again to the northern Kipchaks.
After the Timurud invasion, Ibrahim I of Shirvan, the 33rd Shirvanshah, managed to keep the kingdom of Shirvan independent. Ibrahim I revived Shirvan's fortunes, and through his cunning politics managed to continue without paying tribute. Furthermore, Ibrahim also greatly increased the limits of his state. He conquered the city of Derbend in 1437. The Shirvanshahs integrated the city so closely with their political structure that a new branch of the Shirvan dynasty emerged from Derbend, the Derbenid dynasty. The Derbenid dynasty, being a cadet dynasty of Shirvan, inherited the throne of Shirvan in the 15th century.
In the early 16th century the kingdom of Shirvan was conquered by Shah Ismail of the Safavid dynasty. As Shah Ismail incorporated all the Shirvan possessions, he also inherited Derbend.
Derbent stayed under Iranian rule, while occasionally briefly taken by the Ottoman Turks such as in 1583 after the Battle of Torches and the Treaty of Istanbul, till the course of the 19th century, when the Russians occupied the city and wider Iranian-ruled swaths of Dagestan.
Being briefly taken by the Russians as a result of the Persian expedition of 1722–23 by Peter the Great, the 1735 Treaty of Ganja, formed by Imperial Russia and Safavid Iran, forced Russia to return Derbent and its bastion to Iran. In 1747, Derbent became the capital of the Derbent Khanate of the same name.
During the Persian Expedition of 1796, Derbent was stormed by Russian forces under General Valerian Zubov, but the Russians were forced to retreat due to internal political issues, making it fall under Persian rule again. As a consequence of the Russo-Persian War (1804-1813) and the resulting Treaty of Gulistan of 1813, Derbent and wider Dagestan were forcedly and irrevocably ceded by Qajar Iran to the Russian Empire.