by Russian troops; the Khan fled to Persia and Shemakha was irrevocably incorporated in Russian territory. Iranian anger while being dissatisfied with losing swaths of its integral territories in the North and South Caucasus subsequently sparked the Russo-Persian War (1826–1828), which resulted in another Iranian loss, as well as the ceding of its last remaining territories in the Caucasus comprising what is now Armenia, and southern parts of the contemporary Republic of Azerbaijan. The Treaty of Turkmenchay of 1828 officially ratified the forced ceding of these Iranian territories to Imperial Russia, while it would also mark the official end of millennia long intertwined Iranian hegemony, rule, and influence over the Caucasus region, including Shirvan. People and culture The term Shirvani/Shirvanli is still in use in Azerbaijan to designate the people of Shirvan region, as it was historically. In ancient times, the bulk of the population of Shirvan were Caucasian-speaking groups. Later on Iranization of this native population and subsequent Turkification since the Seljuq era occurred. The bulk of the population today are Turkic-speaking Azerbaijanis, although there are also smaller Caucasian-speaking and Iranian-speaking minorities. Caucasian population The original population were Paleo-Caucasians and spoke Caucasian languages, like the Caucasian Albanians. Today, other Daghestani Caucasian languages such as Udi, Lezgian and Avar are still spoken in the region. Iranian influence and population Iranian penetration started since the Achaemenid era and continued in the Parthian era. However it was during the Sassanid era that the influence really increased and Persian colonies were set up in the region. According to Vladimir Minorsky: "The presence of Iranian settlers in Transcaucasia, and especially in the proximity of the passes, must have played an important role in absorbing and pushing back the aboriginal inhabitants. Such names as Sharvan, Layzan, Baylaqan, etc., suggest that the Iranian immigration proceeded chiefly from Gilan and other regions on the southern coast of the Caspian." Abu al-Hasan Ali ibn al-Husayn Al-Masudi (896–956), the Arab historian states Persian presence in Aran, Bayleqan, Darband, Shabaran, Masqat and Jorjan. From the 9th century, the urban population of Shirwan increasingly spoke Persian, while the rural population seems to mostly have retained their old Caucasian languages. Up to the nineteenth century, there was still a large number of Tat people (who claim to be descendants of Sassanid era Persian settlers), however due to their similar culture and religion with the Turkic-speaking Azerbaijanis, this population was partly assimilated. Turkification