The Early Middle Ages
According to the historical sources, Turks created a vast empire in the second half of the 6th century, which stretched from China in the east to Caucasus, Iran and Byzantine in the west. Study into narrative and lapidary sources, together with toponymy, shows the penetration of Turks into Absheron which took place in the early Middle Ages. Absheron’s toponymy confirms a partial Turkization of Absheron in the early medieval period.
According to the Arab sources, the Turks captured Baku in the first half of the 8th century. During the conquest of Azerbaijan by the Arab caliphate, the Shirvan province included Baku, Shamakhi, Derbent and other towns was ruled by Shirvanshahs. The oil wells and salt mines of Absheron produced significant revenues at the time of the Arab conquest of Shirvan and Azerbaijan.
Following the conquest of the country by Arabs, Islam began disseminating among residents of Baku and villages of Absheron replacing Zoroastrianism and ancient astral beliefs. Following the adoption of Islam by residents of Absheron in the 8th-10th centuries, Islamization of ancient pirs (a Muslim saint or holy place) started. They were sanctified by Muslim traditions and named after Arabic-Muslim religious names (Ali-Ayagy in Buzovna, Pir-Allahi on the island of Pir-Allahi).
To protect the Derbent passage which defended northern borders of caliphate from frequent attacks of northern nomadic tribes that threatened the state security, caliphs spent huge funds to maintain an Arab garrison in Derbent. They borrowed these funds from profits from oil and salt deposits of Apsheron. According to Yagut, funds for protection of Derbent fortifications were borrowed by Sasanides from Baku as well. This information proves the fact that Baku existed during the Sasanid era. Gold, silver and copper coins that were minted by the Abbasid caliphs were used in Baku. Trade relations between Baku and other regions have existed since the Sasanid era. Coin hoards found in the territory of Baku also confirm this fact.
In the second half of the 9th century, owing to the weakening of the Abbasid caliphate and beginning of the disintegration, as well as growth of centrifugal tendencies, several independent feudal states sprang up on the territory of Azerbaijan with Shirvan as the biggest among them. This state was headed by by rulers from Mazyadid dynasty who bore the title of “Shirvanshahs”. Mazyadids were the first Moslem dynasty of Shirvanshahs who were caliph’s vassals and subordinated to the Arab governor-general-emir in Barda.
Various sources report that in the first half of the 7th century the Russians forayed southwestern littoral of the Caspian Sea, while Shirvanshahs and rulers of Derbent fought against invaders. Circa 914, the Russians attacked the Baku seaboard. According to the Arab author Masudi, the Russians plundered rich regions and towns on the Caspian shore. This assault proved to be unexpected for residents of Baku and Absheron who were taken by surprise. At that time Shirvanshah had no his own fleet and weapons to repulse the offensive. For this reason, residents fled deep into the country leaving their houses and lands. From the report of Masudi it follows: by the date of the Russians’ invasion the western littoral of the Caspian Sea had densely been populated. This area was owned by the feudal state of Shirvan which included Absheron and the town of Baku.
In the end of the 10th century Baku was widely known in the Near East as major center of oil to supply the East that mattered most for illumination and therapy, as well as in everyday use and formidable weapon.
Some Arab historians of the later 10th century described Baku as a significant port in the Caspian Sea, which mattered most in the international transit trade.
The territory of the early medieval town occupied a larger area to reach the seaboard as witnessed by a small quantity of simple ceramics going back to the ancient times, and a great number of ceramics dating back to the 8-10 the centuries. It should be noted that all the above mentioned artefacts were found on the top of the hill, where the old Baku situated, on the territory of the Shirvanshahs Palace, at the foot of the hill and in place of foundation pits of the building constructed in Neftchiler Avenue.
No surface architectural monuments going back to the early medieval period (prior to the 8th century) have been extant in Baku. However, excavations on the territory of the Shirvanshahs Palace made it possible to discover remains of walls, buildings and courtyards with tandirs (a special oven made from a pit in the ground) and wells dating from the 8th and earlier centuries. Extant here are always remains of buildings, walls and foundations of later 9-10th centuries; end of the 14th – earlier 15th centuries that preceded to the construction of Palace complex.
Arab sources of the first half of the 10th century say nothing of social relations and urban structure of Baku in the 8-10th centuries.
Oilfields and salt mines were taxable in Absheron. There were special persons in Baku in the 8th century, responsible for collection of taxes from those extracting oil and salt. Oil-bearing lands, oil wells and salt lakes, as well as arable lands of Absheron formed feudal property both of the state and separate feudal lords and were usually granted on lease or farming to a feudal lord who mercilessly exploited the taxable population. Residents of Baku consisted of feudal nobility, owners of oil-bearing and arable lands, salt lakes and gardens. The same persons, as well as big merchants and the clergy seized control over the town administration. They concentrated in their hands huge funds. Main bulk of Baku’s townspeople was comprised of artisans and merchants. These included engravers, painters, jewelers, architects, builders, potters, braziers, smiths, shipbuilders, etc. There were also big and small traders, shopkeepers, town poor and slaves.
Vilayets were led by Divan subordinated to emir. To maintain relations between caliphate and provinces, there was a sort of mail – barid. Arab military garrisons (rabats) were stationed in big towns and localities, including Absheron.
In the second half of the 9th century, the weakening of the Abbasid caliphate, as well as strengthening of the tendency to move away from central government have led to the emergence of a number of independent states in the Caliphate. State of Shirvanshahs was one of them.
Sara Aşurbəyli. Bakı şəhərinin tarixi. Bakı: Avrasiya press, 2006, s. 37-60.