Despite brief intermissions such as these by Safavid Iran's neighboring rivals, the land of what is today Azerbaijan remained under Iranian rule from the earliest advent of the Safavids up to the course of the 19th century.After the Safavids, the area was ruled by the Iranian Afsharid dynasty. 1736–1747), many of his former subjects capitalized on the eruption of instability.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.The Umayyad Caliphate repulsed both the Sasanians and Byzantines from Transcaucasia and turned Caucasian Albania into a vassal state after Christian resistance led by King Javanshir, was suppressed in 667.It is bounded by the Caspian Sea to the east, Russia to the north, Georgia to the northwest, Armenia to the west and Iran to the south.The exclave of Nakhchivan is bound by Armenia to the north and east, Iran to the south and west, and has an 11 km long border with Turkey in the south west.The name Azerbaijan was first adopted for the area of the present-day Republic of Azerbaijan by the government of Musavat in 1918, after the collapse of the Russian Empire, when the independent Azerbaijan Democratic Republic was established.Until then, the designation had been used exclusively to identify the adjacent region of contemporary northwestern Iran, The Sasanian Empire turned Caucasian Albania into a vassal state in 252, while King Urnayr officially adopted Christianity as the state religion in the 4th century.
The local dynasty of the Shirvanshahs became a vassal state of Timur's Empire, and assisted him in his war with the ruler of the Golden Horde Tokhtamysh.
Numerous self-ruling khanates with various forms of autonomy This sparked the final bout of hostilities between the two, the Russo-Persian War of 1826–1828.
The resulting Treaty of Turkmenchay, forced Qajar Iran to cede sovereignty over the Erivan Khanate, the Nakhchivan Khanate and the remainder of the Lankaran Khanate, comprising the last parts of the soil of the contemporary Azerbaijani Republic that were still in Iranian hands.
1524–1576) completely deposed them, and made the area into the Safavid province of Shirvan.
The Sunni Ottomans briefly managed to occupy parts of present-day Azerbaijan as a result of the Ottoman-Safavid War of 1578–1590; by the early 17th century, they were ousted by Safavid Iranian ruler Abbas I (r. In the wake of the demise of the Safavid Empire, Baku and its environs were briefly occupied by the Russians as a consequence of the Russo-Persian War of 1722–1723.