Shirvanshah
Shirvanshah, also spelled as Shīrwān Shāh or Sharwān Shāh, was the title of the rulers of Shirvan, located in modern Azerbaijan, from the mid-9th century to the early 16th century. The title remained in a single family, the Yazidids, an originally Arab but speedily Persianized dynasty, although the later Shirvanshahs are also known as the Kasranids or Kaqanids. The Shirvanshah established a native state in Shirvan.
The Shirvanshahs dynasty, existing as independent or a vassal state, from 861 until 1538; longer than any other dynasty in Islamic world, are known for their support of culture. There were two periods of an independent and strong Shirvan state: first in the 12th century, under kings Manuchehr and his son, Akhsitan I who built the stronghold of Baku, and second in the 15th century under Derbendid dynasty.
Origins
The title 'Shirvanshah' appears to date back to the period before Islam's emergence in the Arabian peninsula. Ibn Khordadbeh mentions the Shirvanshah as one of the local rulers who received their title from the first Sassanid emperor, Ardashir I. Al-Baladhuri also mentions that a Shirvanshah, together with the neighbouring Layzanshah, were encountered by the Arabs during their conquest of Persia, and submitted to the Arab commander Salman ibn Rab'ia al-Bahili.History
Rise of the Shirvanshahs
From the late 8th century, Shirvan was under the rule of the members of the Arab family of Yazid ibn Mazyad al-Shaybani, who was named governor of the region by the Abbasid caliph Harun al-Rashid. His descendants, the Yazidids, would rule Shirvan as independent princes until the 14th century. By origin, the Yazidids were Arabs of the Shayban tribe and belonged to high ranking generals and governors of the Abbasid army. In the chaos that engulfed the Abbasid Caliphate after the death of the Caliph al-Mutawakkil in 861, the great-grandson of Yazid b. Mazyad Shaybani, Haytham ibn Khalid, declared himself independent and assumed the ancient title of Shirvanshah. The dynasty continuously ruled the area of Shirvan either as an independent state or a vassal state until the Safavid times.One of the important books in the early history of this dynasty is the anonymous Taʾrikh Bab al-Abwab, preserved by the Ottoman historian Münejjim Bashi, the last date of which concerning the dynasty is 468/1075. A translation of this important work into English language was published by the orientalist Vladimir Minorsky in 1958. We know from this book that the history of the Shirvan Shahs was closely tied with that of the Arab Hashimid family in Darband and intermarriage between the two Arab families was common with Yazidids often ruling for various periods in the latter town.
By the time of the anonymous work Hodud al-Alam, the Shirvan Shahs, from their capital of Yazīdiyya, had absorbed neighbouring kingdoms north of the Kur river and thus acquired the additional titles of Layzan Shah and Khursan Shah. We can also discern the progressive Persianisation of this originally Arab family. According to Encyclopedia of Islam: After the Shah Yazid b. Ahmad, Arab names give way to Persian ones like Manūčihr, Ḳubādh, Farīdūn, etc., very likely as a reflection of marriage links with local families, and possibly with that of the ancient rulers in Shābarān, the former capital, and the Yazidids now began to claim a nasab going back to Sassanid kings Bahrām Gūr or to Khusraw Anushirwan. According to Vladimir Minorsky, the most likely explanation of the Iranicisation of this Arab family could be marriage link with the family of the ancient rulers of Shabaran. He further states: The attraction of a Sassanian pedigree proved stronger than the recollection of Shaybani lineage. The coat of arms with two lions could be a reminder of the story of Bahrām Gur in Shahnama where Bahrām had to claim the crown from between two lions to be recognized as the king.
Seljuqid rule
In the mid-11th century, Seljuk Turks ended Abbasid control by invading Shirvan from Central Asia and asserting political dominance. The Seljuks brought with them the Turkish language and Turkish customs. The Seljuqs became the main rulers of a vast empire that included all of Iran and Azerbaijan until the end of the 12th century. During the Seljuq period, the influential vizier of the Seljuq sultans, Nizam ul-Mulk is noted for having helped introduce numerous educational and bureaucratic reforms. His death in 1092 marked the beginning of the decline of the once well-organized Seljuq state that further deteriorated following the death of Sultan Ahmad Sanjar in 1153.At the end of 11th and at the beginning of 12th centuries, the Seljuqid state entered to the period of collapse at the result of interior fought for throne among the representatives of Seljuqid dynasty. Utilizing from this circumstance, several governors, who were under the subordination of seljukid state, refused to accept the authority of Sultans.
Georgian rule
In the beginning of the 12th century Shirvan attracted the attention of its expanding Georgian neighbours who on several occasions raided its territory. Shirvanshahs were in position of power shifting between Georgia and Seljuqid states. In 1112 David IV of Georgia gave his daughter Tamar in marriage to son of Shirvanshah Afridun I, Manuchihr III. Afridun lost many castles, including Qabala to David IV of Georgia in 1117 and 1120. After the death of Afridun I, who was murdered in the battle for Derbent, the throne in Shirvan passed to his son, Manuchir III. Manuchir III was under the influence of his wife, Georgian princess Tamar and maintained pro-Georgian orientation. After decisive victory of Battle of Didgori Manuchir rejected to pay tribute to Eldiguzids. Depriving from the tributes in the amount of 40 thousand dinars, the Seljuqid Sultan Mahmud directed to Shirvan at the beginning of 1123, captured Shamakhi and took Shah as hostage contrary to Manuchehr's betrayal.In June, 1123 David IV attacked and defeated Sultan again and captured the cities and fortresses of Shamakhi, Bughurd, Gulustan, Shabran. Manuchehr restored his own power upon David's death in 1125 and started friendly relations with his brother-in-law Demetrius. After her husband's death, Tamar found herself involved in a power struggle among her sons, favoring the younger, who joined her in an attempt to unite Shirvan with Georgia with the help of Kipchak mercenaries. Manuchehr's older son Akhsitan I was able to secure support from the Eldiguzids of Azerbaijan, winning the contest for the throne and forcing Tamar and his younger brother into flight to Georgia.
Ahsitan conducted independent policy, created close relations with Georgians, as well as with the Eldiguzids in the presence of Shams al-Din Ildeniz and Jahan Pahlavan. In 1173 Akhsitan I came to the aid of his father-in-law, George III by putting down the revolt of Prince Demna. Akhsitan reign saw raids of Rus' with 73 ships in 1174 which sailed from Volga and threatening shores of river Kura and a Kipchak hordes who sacked Derbent and captured Shabran in the same year. Akhsitan called his ally Georgia, which proved to be successful in siege of Derbent. George III subjugated city and turned it over to shah and strengthened the Georgian dominance in the area. They also defeated and burned Rus' navy.
Akhsitan attempted to intervene the interior affairs of the Eldiguzids and opposed Qizil Arslans aspiration to the throne, but he was defeated. In the response to this, Qizil Arslan invaded Shirvan in 1191, reached to Derbent and subordinated the whole Shirvan to his authority. A year later, in 1192, Shamakhi was destroyed by a terrible earthquake, and Akhsitan I moved the Shirvan capital to the city of Baku. Early in the 1190s, the Georgian government under the Tamar the Great began to interfere in the affairs of the Eldiguzids and of the Shirvanshahs, aiding rivaling local princes and reducing Shirvan to a tributary state. The Eldiguzid atabeg Abu Bakr attempted to stem the Georgian advance, but suffered a defeat at the hands of David Soslan at the Battle of Shamkor and lost his capital to a Georgian protégé in 1195. Although Abu Bakr was able to resume his reign a year later, the Eldiguzids were only barely able to contain further Georgian forays.
Nomadic invasions
Shirvan was greatly devastated by Mongol invasion in 1235, from which it was not able to fully recover for the next century. In the 13th and 14th centuries Shirvan was a vassal of stronger Mongol and Timurid empires. Shirvanshah Ibrahim I revived the country's fortunes, and through his cunning politics managed to resist Timurid conquest, letting the state go with paying a tribute.Safavid rule
The Shirvanshah rulers were more or less Sunni. In 1462 Sheykh Junayd, the leader of Safavids, was killed in a battle against Shirvanishans near the town of Khachmaz – an event that Safavids never forgot. In 1500-1, with the intention to avenge his murdered ancestors, the first Safavid king Ismail I invaded Shirvan, and, despite heavily outnumbered, defeated then incumbent Shirvanshah Farrukh Yassar in a pitched battle, in which the latter and his entire army were killed. He then proceeded towards Baku which was sacked, and the mausoleum of the Shirvanshahs exhumed and burned. Most of Baku population was forcibly converted to Shi'ism thereafter.The vassal Shirvan state managed to hang on for a few more years, until 1538, when Ismail's son and successor Tahmasp I appointed its first Safavid governor, and made it a fully functioning Safavid province.