The Ziyarids, alongside the Buyids, form one of the two major Dailamite dynasties of the Islamic period of Iranian history. Although preceding the Buyids in their state building project, the Ziyarids never reached the level of power or influence that the Buyids possessed, and often remained tributaries of the latter, or occasionally the Samanids. In some senses, it would be more fitting to consider the Ziyarids as part of the local dynasties of the Caspian region, alongside the Dabuyids, Padhuspans, Bavandis, and the Qarinvands, the so-called lords of the highlands. However, the fact that their initial activities, and their occasional successes, brought them beyond the confines of the southern Caspian region does well render them as a major dynasty of Iran.
The Ziyarids, unlike the Buyids, had a noble background. Ziyar, the eponymous forefather of the dynasty, was son of Mardanshah, a local chief in Gilan. His wife, and the mother of the future founder of the dynasty, was a princess of the Bavandi dynasty, thus belonging to the noblest family of the Caspian region. We do not know much about the career of Ziyar himself, but he most likely was a retainer of Rostam II, the Bavandi king, who was most likely his brother-in-law as well. His son, Mardavij, joined the service of the Zaidi imam/rulers of Amul around 913-914, serving under the command of Asfar ibn Shiruyh, a Dailamite commander.
However, his initiation into the army coincided with the assassination of the Samanid Amir Ahmad and the internal destabilization of the Samanid armies that followed it. As retainers of the Samanids, this gave an opportunity to the various Dailamite commanders to rise in rebellion, a trend which did not pass Asfar. The Dailamite commander quickly proceeded to conquer Gorgan, the main Samanid city on the southeastern corner of the Caspian, as well as Amul, Rey, and Zanjan. By 925, Asfar was in charge of large parts of northern Iran, and Mardavij was elevated to the position of the governor of Zanjan and the western foothills of the Alburz range.
However, in 927, Asfar was assassinated by his own army, due to his increasing cruelty, and Mardavij quickly rose to replace him in the commanding position. Now in control of northern Iran, Mardavij managed to capture Isfahan, the major city in central Iran, in 931, and crowned himself Shahanshah, “the King of Kings,” a title which was not used since the Sasanian period. From Isfahan, Mardavij planned to restore the Sasanian Empire and rise against the caliph. He invaded Fars and captured Shiraz, and penetrated in Kurdistan as far west as Dinawar, and into Khuzistan, even reaching Ahvaz. However, the deep division among his soldiers, particularly between the Dailamite and the Turkic elements in the army, made him quite weak. In 935, he was assassinated by two of his Turkic commanders who then fled to the protection of the Caliph in Baghdad.
The death of Mardavij, at the same time, allowed the Buyid brothers to rise against the Ziyarids and drive his brother and successor, Voshmgir, out of Isfahan. Taking refuge in Ray, the area of his governorate during Mardavij’s life, Voshmgir was eventually confined to the northern part of the Ziyarid territories, while the Buyids used Isfahan as a base for their conquest of Fars, Kerman, Khuzistan, and Baghdad. The Ziyarids in turn tried to expand their territories to the east and northeast, resulting in Voshmgir allying himself with the rebel Samanid general, and a fellow Dailamite, Makan ibn Kaki, to challenge the Samanid Nasr II. However, the pair was defeated in 940 and Makan was killed, while Voshmgir returned to Gorgan. There, he was challenged by the governor of Sari, and Makan’s cousin, Hasan ibn Firuzan, who was now allied with the Buyid Hasan Rokn ol-Dowleh.
The rest of Voshmgir’s rule was then spent in managing diplomacy between the increasing power of the Buyids and the imperialistic tendencies of the Samanids. While Voshmgir in effect became a client of the Samanids, his nemesis Hasan ibn Firuzan joined the camp of the Buyid Hasan, the latter capturing Voshmgir’s former capital in Ray and using it as his own seat of power. Voshmgir was then confined to Gurgan as his capital, trying, with Samanid backing, to ensure his rule over Gurgan and Tabaristan. The increasing pressure of Hasan Rokn ol-Dowleh on Voshmgir required him to constantly ask for help from the Samanids, a fact that lead to a peace agreement in 955, allowing Voshmgir to keep Gorgan and most of Tabaristan for himself. However, in 958 Voshmgir again attacked and captured Ray, which he only held for a few years, prompting another Buyid invasion of Tabaristan in 962. The diplomatic and long-ruling Ziyarid king was eventually killed, fittingly by a boar during a hunt, in 967.
The succession to Voshmgir was an internal fight between his eldest son, Bistun, and his younger son, Qabus, who was supported by the Samanids. Bistun, however, strengthened his own backing by marrying a daughter of the Buyid Amir, Ezad ol-Dowleh, and successfully capturing the crown of Tabaristan and Gurgan in 967. His power in the region, and his success in calming the local opposition to the caliphate, earned him the honorific title of Zahir ol-Dowleh. Bistun died in 978, leaving the throne to his brother Qabus, who now succeeded him as the king of Tabaristan and Gorgan.
A poet and well-known scholar of Persian and Arabic, Qabus was nonetheless an ineffective ruler and weak military commander, as well as having a reputation for cruelty. He seems to have switched his allegiance temporarily at the beginning of his rule, when his coins show the name of the Buyid Fakhr ol-Dowleh as his suzerain. Offering refuge to the latter in face of attacks by his brother Ezad ol-Dowleh, Qabus was inevitably caught in the Buyid conflicts and the desire of Ezad ol-Dowleh to dominate the Buyid domains. Qabus by this time had received the title of Shams ul-Ma’ali from the caliph, mostly indicating his achievements as a scholar. In 984, a joint effort of Qabus and Fakhr ol-Dowleh to restore the deposed Buyid Amir to his throne in Ray resulted in a Buyid occupation of Gorgan and Tabaristan. The exiled Ziyarid and Buyid Amir now had to take refuge with the Samanids in Neishabur, where they remained for years. In 984, Fakhr ol-Dowleh managed to regain Ray, through negotiations conducted by his vizier, the famous scholar Saheb Ebhrahim ibn Abbad. However, the vizier considered Qabus to be a trouble maker and thus kept Tabaristan and Gorgan under direct Buyid rule, leaving Qabus in exile until Fakhr ol-Dowleh’s death in 997. Following the succession of Fakhr ol-Dowleh’s son, Majd ol-Dowleh Rostam, to the Buyid throne, the latter’s mother, Seyyeh Malakeh Khatoun, a second cousin of Qabus, became a regent, and thus allowed Qabus to return to Gurgan.
The second reign of Qabus, from 998-1012, is mostly a story of his revenge against those who had refused to support him, although brilliant occasions also occurred. Since Qabus had met many of the greatest scholars of the time at the Samanid court, he now invited them, including Abu Rayhan al-Biruni (who was escaping the Ghaznavid onslaught) to take residence at his court in Gorgan. Abu Rayhan in 1000 wrote his general ancient history, Athar ul-Baghiya, and dedicated it to Shams ol-Ma’ali Qabus, one of the greatest testaments to the cultural flourishing at the minor court of the Ziyarids. In fact, the Ziyarids from this point on kept their power, and their reputation, mostly through their enlightened patronage of scholarship and arts.
Qabus’ personal cruelty, however, resulted in his removal by his troops in 1012, and an eventual exile to Bastam and finally death in the same year. He was buried in the magnificent mausoleum tower whose building he himself had supervised. His son, Falak ol-Ma’ali Manuchehr, then succeeded him as the king of Gorgan and Tabaristan. The ascendance of Manuchehr coincided with the rise of the Ghaznavid Sultan Mahmoud, who was by this time in full control of Khorasan and thus exerted power over Manuchehr. The threat of the Ghaznavids was further strengthened by their support for Manuchehr’s younger son, Dara, who lived in fact in Ghazni. Manuchehr was forced to pay hefty annual tributes to Sultan Mahmoud, and was confirmed as the governor of Tabaristan under the latter, minting coins in the Ghaznavid style. He was, in fact, the last Ziyarid ruler to mint coins in significant numbers.
Manuchehr was succeeded in 1029 by his son Anushirvan, although the latter was in fact excluded from power by a powerful regent, Abu Kalijar ibn Vi(v)han. However, in 1035, a large scale invasion of Khorasan and Tabaristan by the Ghaznavid Mas’ud removed Abu Kalijar from power, allowing Anushervan to rule on his own, although still under the direct Ghaznavid rule, and under the conditions of paying high trubutes. Following the death of Anushirvan in 1043, the Ziyarid rulers in effect became minor governors of the city of Gorgan, with the aforementioned Dara, the uncle of Anushirvan, ruling for a short while in Gorgan and as the ruler of Tabaristan. However, by this time, both Khorasan and Tabaristan had been invaded by Tughril Beg, the Seljuk Sultan, and were made clients of the newly created Seljuk Empire. Locally, the Ziyarids had to deal with the rising power of the Isma’ilis who were slowly capturing the highland fortresses of the Caspian region, in their rebellion against the Seljuk rule, and thus depriving the Ziyarids, and other Dailamite rulers who supported them, of their stronghold against the Seljuk rule. So, in 1090, the Ismai’ilis managed to gain control of the area of Gorgan and put an effective end to the Ziyarid rule in that city.
The history of the Ziyarids, however, has often been continued after Anushirvan by considering Onsor ol-Ma’ali Kay-Kavus, son of Iskandar and a grandson of Qabus, as a ruler of the dynasty. Kay-Kawus, the author of one of the monuments of Persian literature, the Qabus-Nameh, was in fact a Ziyarid prince, although we have no evidence of him actually ever ruling. Instead, he seems to have been a retained at the Ghaznavid court, and occasionally also at the court of the Shaddadid amirs of Arran (Caucasian Albania). The book, written as a book of anecdotes and advice, in the genre of Mirror of Princes, provides practical advice for Kay-Kawus’ son, Gilanshah, who is often called the last Ziyarid king. However, no numismatic, and additionally not even textual, evidence exists about his rule. In all likelihood, the Ziyarids at this time were simply local nobility of Gorgan and in fact, only acted as courtiers of the more powerful dynasties around them.