The territory of modern-day Azerbaijan has been inhabited by humans since ancient times. Evidence of this can be found in various archaeological sites, such as the Azykh Cave in Nagorno-Karabakh, as well as in Garaaja and the Gobustan National Park. These traces of early human presence date back between 800,000 and 10,000 to 12,000 years.
The earliest states formed on the land that would later become Azerbaijan were Manna and the Scythian Kingdom, flourishing between the 10th and 7th centuries BCE. Subsequently, conquerors from the Median Empire arrived, followed by rulers from the Achaemenid dynasty of ancient Persia. Ancient historians referred to this region as Little Media, highlighting its historical roots.
By the beginning of the Common Era, the eastern part of modern Azerbaijan and southern Dagestan united to form the state of Caucasian Albania, established by local tribes that had first emerged in the 4th century BCE. These tribes, united as the Albanians, became a formidable force and the progenitors of many peoples, including the modern-day Lezgins of Dagestan, who inherited both their language and ethnic identity from Caucasian Albania. By the start of our era, they had established their own territory and military, complete with cavalry for its defense.
The religion of the Albanians centered around local cults, nature worship, and celestial deities, alongside the Zoroastrianism that spread from Media. Followers of this ancient philosophy lived for many centuries in the eastern regions, particularly around Baku, where one can still find remnants of their sacred sites today.
In conjunction with their religious practices, the Albanians developed a sense of statehood. Ancient historians noted that by the 2nd century CE, Albania boasted around 30 fortified settlements. The capital of this kingdom was the city of Kabala, located in modern-day Gabalinsky District of Azerbaijan. The independence of this state was compromised in the 1st century CE when the Romans invaded the Caucasus, with Pompey’s legions subjugating the Caspian coast and establishing Albania as a Roman colony.
Simultaneously, in the southwest, the state of Greater Armenia was emerging. Under the leadership of capable generals, Armenia quickly expanded its territories across the Armenian Highlands and the Lesser Caucasus, taking lands previously held by the Scythians and Albanians. Ancient scholars described these regions as predominantly Armenian-speaking.
However, during that era, linguistic affiliation was of little concern to the people; the focus was primarily on statehood and later on religion. It is believed that the Armenians were the first to introduce Christianity to these lands, with the Armenian kingdom adopting the Christian faith at the state level and setting an example for others. According to chronicles, the Albanian king Urnayr was baptized in Armenia by Saint Gregory the Illuminator.
During this period, the Albanian script emerged. However, by the early Middle Ages, Albania began to disintegrate due to invasions by nomadic tribes, including the Huns and Khazars, as well as Iranian influences and incursions from the Arab Caliphate. This fragmentation was exacerbated by the arrival of Islam in the region.
Between 387 and 651 CE, the territories of present-day Azerbaijan became a battleground for the interests of the Sasanian dynasty of Persia and later the Arab Caliphate. The Arabs brought Islam to the region, which gradually supplanted Christianity and remains the official religion of the state today.
Frequent warfare ensued until the Arabs established dominance in the region. Many Arab families and entire tribes were relocated here by decree of the caliphs or of their own volition. The mid-7th century marked a period of extensive Arab conquests in the South Caucasus. The Arabs became the ruling class, and many local princes acknowledged the authority of the conquerors. Under Arab rule, the population continued to speak their native languages and dialects, while Islam became the predominant religion.
Typically, in conquered territories, the local populace was subjected to taxes, and local agreements were made regarding taxation. The fragmentation of interests within the Caliphate led to the emergence of several small principalities, with the Shirvanshahs kingdom becoming the most influential.
The term Shirvanshahs is used in historical literature to refer to the rulers of the Shirvan kingdom. This medieval state was considered one of the largest and most prosperous in the Caucasus, and historians claim that “the land of Shirvan extends from the banks of the Kura River to Derbent.“
Shirvan has a distinct history dating back to 861 CE, reaching its peak during the mid-14th century under Shirvanshah Ibrahim. The first capital was located in the city of Shamakhi, while the second was established in Baku.