The region and seven adjacent districts outside it became de facto independent with the end of the Nagorno-Karabakh War in 1994.
The power vacuum left by the decline of the Abbasid Caliphate was filled by numerous local dynasties such as the Sallarids, Sajids, and Shaddadids.
At the beginning of the 11th century, the territory was gradually seized by waves of Oghuz Turks from Central Asia.
In the Avesta, Frawardin Yasht ("Hymn to the Guardian Angels"), there is a mention of âterepâtahe ashaonô fravashîm ýazamaide, which literally translates from Avestan as "we worship the fravashi of the holy Atropatene." The Greek name was mentioned by Diodorus Siculus and Strabo.
Over the span of millennia the name evolved to Āturpātākān (Middle Persian) then to Ādharbādhagān, Ādharbāyagān, Āzarbāydjān (New Persian) and present-day Azerbaijan.
It is bound 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 north west.
Caucasian Albanians, the original inhabitants of northeastern Azerbaijan, ruled that area from around the 4th century BC, and established an independent kingdom.
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.
Following Timur's death, two independent and rival states emerged: Kara Koyunlu and Aq Qoyunlu.
The Shirvanshahs returned, maintaining a high degree of autonomy as local rulers and vassals from 861, for numerous centuries to come.
The country is a member state of the Council of Europe, the OSCE and the NATO Partnership for Peace (Pf P) program.