The military history of Azerbaijan is framed within thousands of years of armed actions of many other states in the territory encompassing modern Azerbaijan, as well as the shorter history of interventions by the Azerbaijani Armed Forces in conflicts abroad. The Azerbaijanis are the inheritors of the lands of various ancient civilizations and peoples including the indigenous Caucasian Albanians, Iranian tribes such as Scythians and Alans, and Oghuz Turks among others (note that several modern peoples of the Caucasus can trace their ancestries to more than one of these same ancient peoples).

Azerbaijan's location on the crossroads of Asia and Europe made it possible for Azerbaijanis to have military contact with both the Asian and European military powers.

Military history of Azerbaijan

Antiquity

Caucasian Albania

Caucasian Albanians are believed to be the earliest inhabitants of Azerbaijan. Early invaders included the Scythians, who arrived in the region in the 9th century BCE. The South Caucasus was eventually conquered by the Achaemenids around 550 BCE. It was around this period that Zoroastrianism spread in Azerbaijan. The Achaemenids in turn were defeated by Alexander the Great in 330 BCE. Following the decline of the Seleucids in Persia in 247 BCE, an Armenian Kingdom exercised control over parts of modern Azerbaijan between 190 BCE to 428 CE. Caucasian Albanians established a kingdom in the 1st century BCE and largely remained independent until the Sassanids made the kingdom a province in 252 CE. Caucasian Albania's ruler, King Urnayr, officially adopted Christianity as the state religion in the 4th century CE, and Albania would remain a Christian state until the 8th century. Sassanid control ended following their defeat to Muslim Arabs in 642 CE.

Military history of Azerbaijan

Middle Ages

Islamic Conquests

Muslim Arabs defeated the Sassanids and Byzantines as they marched into the Caucasus region. The Arabs made Caucasian Albania a vassal state after the Christian resistance, led by Prince Javanshir, surrendered in 667. Between the 9th and 10th centuries, Arab authors began to refer to the region between the Kura and Aras rivers as Arran. During this time, Arabs from Basra and Kufa came to Azerbaijan and seized lands that the indigenous peoples had abandoned; the Arabs became a land-owning elite. Despite pockets of continued resistance, the majority of the inhabitants of Azerbaijan converted to Islam. Later on in the 10th and 11th centuries, Kurdish dynasties of Shaddadid and Rawadid ruled parts of Azerbaijan.

Military history of Azerbaijan

Shirvanshahs

Shīrwān Shāh or Sharwān Shāh, was the title in mediaeval Islamic times of a Persianized dynasty of Arabic origin. The Shirvanshah established a native Azerbaijani state and were rulers of Shirvan, a historical region in present-day Azerbaijan. The Shirvanshahs established the longest Islamic dynasty in the Islamic world.

Seljuqs and successor states

The Seljuq period of Azerbaijan's history was possibly even more pivotal than the Arab conquest as it helped shape the ethnolinguistic nationality of the modern Azerbaijani Turks.

After the decline of Abbasid Caliphate, the territory of Azerbaijan was under the sway of numerous dynasties such as the Salarids, Sajids, Shaddadids, Rawadids and Buyids. However, at the beginning of the 11th century, the territory was gradually seized by waves of Oghuz Turkic tribes emanating from Central Asia. The first of these Turkic dynasties was the Ghaznavids from northern Afghanistan, who took over part of Azerbaijan by 1030. They were followed by the Seljuqs, a western branch of the Oghuz who conquered all of Iran and the Caucasus and pressed on to Iraq where they overthrew the Buyids in Baghdad in 1055.

Safavids and the rise of Shi'a Islam

The Safavid order (Safaviyeh) was a Sufi religious order formed in 1330s by Sheikh Safi Al-Din (1252–1334), after whom it was eponymously named.

This Sufi order openly converted to the heterodox branch of Twelver Shi'a Islam by the end of the 15th century. Some Safavid followers, most notably the Qizilbash Turks, believed in the mystical and esoteric nature of their rulers and their relationship to the house of Ali, and thus, were zealously predisposed to fight for them. The Safavid rulers claimed to be the descendants of Ali himself and his wife Fatimah, daughter of the Islamic prophet Muhammad, through the seventh Imam Musa al-Kazim. Qizilbash numbers increased by the 16th century and their generals were able to wage a successful war against the Ak Koyunlu state and capture Tabriz.

The Safavids, led by Ismail I, expanded their base, sacking Baku in 1501 and persecuting the Shirvanshahs.