Shirvān
Shirvan stretched along the eastern Caucasus towards the Caspian, encompassing mountain slopes, grain-growing lowlands and cities on the coastal road. Its rulers, the Shirvanshahs, maintained a long-lived dynasty whose principal centers included Shamakhi and Shabran. The region stood between the powers of Iran and the northern Caucasus, and its towns carried goods between the interior and the sea.
Safavid expansion brought the rule of the Shirvanshahs to an end in the sixteenth century. Shirvan later became a battleground for Ottoman, Iranian and Russian ambitions: a 1724 agreement divided the Caspian coast around Baku from the inland country governed from Shamakhi. After Nader Shah's death, a Shirvan khanate emerged; from 1768 to 1774 it came under Fath-Ali Khan of Quba. The khanate was drawn into the rivalry between Russia and Qajar Iran at the turn of the nineteenth century.