First line (861–1382) The first line of the Shirvanshahs were the
Yazidids (also known as the Mazyadids), descended from
Yazid ibn Mazyad al-Shaybani (died 801), a member of the
Banu Shayban tribe that was dominant in the region of
Diyar Bakr in the northern
Jazira. He was twice appointed the governor of
Arminiya by the
Abbasid caliph Harun al-Rashid (). During his second tenure, his domain also included
Azerbaijan, Shirvan and Darband. The first Yazidi to use the title of
Shirvanshah was Yazid's grandson
Haytham ibn Khalid in 861, who was also the first Yazidi to specifically govern only Shirvan. By using this title, the Yazidids showed their adherence to ancient Iranian ideals. The Arab
Hashimid family in Darband played a major role in the history of the Yazidids. They often intermarried, and the Yazidids also occasionally managed to gain control over Darband, sometimes through the appeal of rebels. By the time of the composition of the 10th-century geography book ''
Hudud al-'Alam in 982, the domain of the Shirvanshahs had increased. It now comprised the minor principalities north of the Kur River, including Layzan and Khursan, whose titulature (Layzanshah
and Khursanshah'' respectively) the Shirvanshahs had assumed. From the reign of
Yazid ibn Ahmad () onward, there is a moderately complete collection of coins minted by the Shirvanshahs. Due to the culturally Persian environment they lived in, the Yazidi family had slowly become
Persianized. Intermarriage with the native families of the eastern part of the South Caucasus—which may have included the historic ruling line of the former Shirvani capital of
Shabaran—probably contributed to this. Starting with Shirvanshah
Manuchihr I (), their names became almost completely Persian instead of Arabic, such as Manuchihr, Qubad and Faridun. The family now preferred to use names from national Iranian history and also claimed to be descended from pre-Islamic, Sasanian-era figures such as
Bahram Gur () or
Khosrow I Anushirvan (). The allure of a Sasanian heritage now outweighed memories of ancestry from the Banu Shayban. This process is comparable to how the originally Arab
Rawadid dynasty in Azerbaijan became
Kurdish due to the Kurdish environment they lived in. in Records regularly mention battles between the Shirvanshahs and the "infidel" inhabitants of the central Caucasus, including the
Alans, the people of
Sarir, and the Christian
Georgians and
Abkhazians. In 1030, Manuchihr I was defeated near
Baku by invading
Rus, who then advanced into Arran. There they sacked the city of
Baylaqan and then left for the
Byzantine Empire. Not long afterwards, the eastern part of the Southern Caucasus became vulnerable to
Oghuz raids through northern Iran. Because of his fear of the Oghuz, Shirvanshah
Qubad () had in 1045 to surround his capital of
Shamakhi/Yazidiya with iron gates and a robust stone wall. In 1066/67, Shirvan was attacked twice by the Turkic commander Qarategin, who ravaged the environment of Baku and Maskat. Shirvanshah
Fariburz I () was soon forced to acknowledge the suzerainty of the
Seljuk ruler
Alp Arslan (), who at that time was near Arran following his Georgian campaign. Fariburz I had to pay a large yearly tribute of 70,000
gold dinars, which would later be lowered to 40,000. Soon after this event, the coins of Fariburz I cite not only the
Abbasid caliph, but also the Seljuk ruler
Malik-Shah I () as his overlords. Armenian-American historian
Dickran Kouymjian argues that Fariburz I must have used Byzantine or Seljuk coins to pay the tribute, as there is currently no proof of gold coin mints in the Caucasus around this period. Fariburz I managed to retain a considerable amount of power until his death in 1094, which was followed by a dynastic strife over the throne. , minted at
Shamakhi between 1120 and 1160 Another Seljuk invasion of Shirvan took place during the reign of
Mahmud II (), which the Georgians capitalized on by attacking Shamakhi and Darband. In the mid 12th-century, Shirvan was more or less a Georgian protectorate. For some time, Shakki,
Qabala and Muqan was under direct control by the
Bagrationi kings of Georgia, who even occasionally used the title of
Shirvanshah. The Shirvanshah and Bagrationi family also agreed to make political marriages to become allies. Due to these developments, the Shirvanshahs shifted their focus towards the
Caspian Sea, several times enlarging their borders as far as Darband. Later on, the names and family ties of the Shirvanshahs become exceedingly convoluted and uncertain in sources, with Munejjim-bashi providing an incomplete record of them, starting with
Manuchihr III (). Sources now start referring to the Yazidi family as the "Kasranids" or "Khaqanids". Besides using the title of
Shirvanshah, Manuchihr III also used the title of
Khāqān-e Kabir ("Great
Khan"), which was the inspiration behind the (
pen name) of his
eulogist,
Khaqani. Numismatic evidence demonstrates that the Shirvanshahs served as Seljuk vassals in the 12th century until the reign of the last Seljuk ruler,
Toghrul III (). Following that, only the names of the caliphs are shown on their coins. During the rule of
Akhsitan I (), the royal residence was moved from Shamakhi to Baku, after the former was seized by the
Eldiguzid ruler
Qizil Arslan (). This marked the beginning of Baku's rise as a major city, though it remains uncertain if Akhsitan later moved back to Shamakhi. Nevertheless, Baku is known to have later served as the capital of the Shirvanshahs. At the start of the 13th century, the Shirvanshahs conquered Darband, seemingly putting an end to its ruling dynasty, the
Maliks of Darband. In 1225, Shirvanshah
Garshasp I () was ordered by the
Khwarazmshah Jalal al-Din Mangburni () to pay a tribute identical to the one the Fariburz I had paid Malik-Shah I. The Shirvanshahs soon became subjects of the
Mongol Empire (1206–1368), whose rulers they mentioned on their coins. The title of
Shirvanshah was not shown on their coins, but the name of the ruling Shirvanshah remained. The Shirvanshahs were later under the suzerainty of the
Ilkhanate (1256–1335), a period in which no coins from Shirvan have been found. The Shirvanshahs were also sometimes under the rule of the
Golden Horde. Following the collapse of the Ilkhanate, the Kingdom of Shirvan was once again to able to rule autonomously, under the rule of
Kayqubad I and then later his son
Kavus I. However, during the reign of the latter, the Kingdom of Shirvan came under the rule of the
Jalayirid Sultanate (1335–1432). Kavus I died in 1372/73 and was succeeded by his son
Hushang, who was killed by his subjects in 1382, thus marking the end of the Yazidi/Kasranid line.
Second line (1382–1538) in battle with the King of Shirvan",
Mo'en Mosavver,
Isfahan, late 17th-century The Shirvanshahs' throne was subsequently taken over by
Ibrahim I (), a distant relative of the Yazidi/Kasranid family. This marked the start of the Darbandid line. Ibrahim initially served as a vassal of the
Turco-Mongol conqueror
Timur (), but became independent after the latter's death. The two following Shirvanshahs—
Khalilullah I () and
Farrukh Yasar () both had long reigns, overseeing a period where Shirvan was peaceful and thriving. Baku and Shamakhi both saw the construction of many well-made buildings, including the
Palace of the Shirvanshahs, a
UNESCO World Heritage Site. It was also during this period that the Shirvanshahs made contact with the leaders of the
Safavid order. Khalilullah I's men killed the Safavid leader
Shaykh Junayd during a raid by the latter on Shirvan in 1460. Junayd's son,
Shaykh Haydar, died a similar death; on 9 July 1488 he was killed during a battle near Darband by the combined forces of Farrukh Yassar and the
Aq Qoyunlu ruler
Ya'qub Beg (). Haydar's eldest son,
Ali Mirza Safavi, briefly became the new head of the order, but he was soon killed by the forces of the Aq Qoyunlu prince
Rustam Beg (). Shortly before his death, he had appointed his younger brother Ismail (later regnally known as
Ismail I) as his successor. By 1500, the
Safavid army was large enough to launch a large expedition against Shirvan. Ismail was determined to avenge the death of his father by Farrukh Yassar, and justified this decision after having convinced his supporters that he had been told in a dream by one of the
Twelve Imams to deal with Farrukh Yassar. Ismail assembled a force of 7,000
Qizilbash and invaded Shirvan, defeating and capturing Farrukh Yassar at a battle near
Golestan in December. The victory was hailed as a "divine punishment" against the Shirvanshahs for the death of Ismail's grandfather and father. Farrukh Yassar was beheaded and his body burned, while the skulls of the dead Shirvanis were piled in pyramids, a common Turco-Mongol practice. Baku was subsequently captured and almost completely destroyed by
Khadem Beg Talish, who had the body of the Khalilullah I dug up, burned and publicly scattered. Although the Safavids and Shirvanshahs had a hostile relationship, Ismail I allowed them to continue their rule in Shirvan, albeit as vassals of
Safavid Iran. This ended in 1538 when
Shah Tahmasp I () dismissed
Shahrukh due to the latter's continuous disloyalty. Shirvan was subsequently made a
province of the Safavid realm, thus marking the end of the Shirvanshahs' rule. A reconquest of Shirvan was attempted multiple times by members of the Shirvanshah family, including
Burhan Ali and his son
Abu Bakr Mirza, who enlisted the help of the Ottoman Empire. However, none of these attempts had long-term success; the Ottomans managed to briefly occupy Shirvan between 1578 and 1607, until it was retaken by the Safavids. == Culture ==