Despite being one of the chief vassals of the Sasanian emperor, the Albanian king had only a semblance of authority, and the Sasanian marzban (military governor) held most civil, religious, and military authority.In the first half of the 7th century, Caucasian Albania, as a vassal of the Sasanians, came under nominal Muslim rule due to the Muslim conquest of Persia.Also, Baku and its environs were briefly managed by the Russians in the early 18th century as a consequence of the Russo-Persian War (1722–23).
In the 4th and 3rd centuries BC, following the overthrow of the Achaemenid Empire, the southwestern part of modern Azerbaijan was part of the Kingdom of Armenia ruled by the Orontid Dynasty; between the years 189 BC and 428 AD, the western half of modern Azerbaijan, including the exclave of the Nakhchivan Autonomous Republic, were included into the Kingdom of Armenia ruled by Armenia's Artaxiad and Arsacid dynasties, the latter itself a branch of the eponymous Arsacid dynasty of the Parthian Empire.
After the partition of the Kingdom of Armenia by Iran and Byzantium in 387 AD, the provinces of Artsakh and Utik, which had an ethnically mixed population, passed to Caucasian Albania.
After the Safavids, the area was ruled by the Iranian dynasties of Afshar and Zand and briefly by the Qajars, until the latter was eventually forced to cede it to the Russian Empire in the course of the 19th century.
However, self-ruling khanates with various forms of independence Following a chain of events that started with the re-subjugation of Georgia into Iran in 1795, Russia would now actively contest and battle with the latter over possession of the Caucasus region which was, for the most part, in the hands of Iran.
Over the span of millennia the name evolved to Āturpātākān (Middle Iranian) then to Ādharbādhagān, Ādharbāyagān, Āzarbāydjān (New Persian) and present-day Azerbaijan.