Ali I (Bavandid ruler)

Ali I (Persian: علی), was the ruler of the Bavand dynasty from 1118 to 1142. He was the uncle and successor of Rustam III.

Rise to the throne
Ali I was the son of Shahriyar IV, and had four brothers, named Qarin III, Yazdagird, Rustam and Bahram.

In 1106, the Seljuq Sultan Muhammad I conquered the Ismaili fortress of Shahdiz, and ordered Shahriyar IV to participate in the Seljuq campaign against Ismailis. Shahriyar, greatly angered and feeling offended by the message Muhammad sent him, refused to aid him against the Ismailis. Shortly after the sultan sent an army headed by Amir Chavli who tried to capture Sari but was unexpectedly defeated by an army under Shahriyar and his son Qarin III. Muhammad then sent a letter, which requested Shahriyar to send one of his sons to the Seljuq court in Isfahan. He sent his son Ali I, who impressed Muhammad so much that he offered him his daughter in marriage, but Ali refused and told him to grant the honor to his brother and heir of the Bavand dynasty, Qarin III. Qarin III then went to Isfahan court and married her. After his return to Sari, however, he began claiming the Bavand throne for himself, and started abusing his father Shahriyar and his servants. Shahriyar then moved to Amol and later Rudsar, where he built a Khanqah, and devoted himself to religion. However, when he got sick, Qarin III apologized and restored him as the ruler of the Bavand dynasty.

Qarin III's refusal to submit to the Seljuq atabeg of Ray, made the atabeg offer Ali an opportunity to conquer Mazandaran, with he agreed to. Shahriyar quickly sided with Qarin III and convinced Ali to withdraw. Nevertheless the strife continued among the two brothers. Ali later went to Marw and joined the Seljuq prince Ahmad Sanjar, the ruler of Khorasan. Ahmad Sanjar was preparing for an expedition to the west in order to take control of Gorgan, but an attack made by Muhammad Khan on the Seljuq borders, forced Ahmad Sanjar to move east in order to repel Muhammad Khan. This allowed Qarin III to capture Gorgan while Shahriyar stayed in Tamisha.

Shahriyar later fell ill and died in 1117 and was succeeded by Qarin III. Qarin later fell ill, and died in 1117 after he asked the local people to pledge allegiance to his son Rustam III, whom succeeded him as the ruler of the Bavand kingdom.

Rustam III, shortly after his accession of the Bavandid throne, was challenged by Ali I, who still claimed the Bavandid throne. The Seljuq Sultan Muhammad I, then requested the two Bavandid rivals to appear in the Seljuq court of Isfahan. Rustam, however, refused, but later changed his mind and went to Isfahan, where he shortly fell ill and died. According to some sources, Rustam was poisoned by his stepmother, the sister of Muhammad I, who wanted to marry Ali I. Ali I then ascended the Bavandid throne.

Reign
However, Muhammad I wanted himself to dominate Mazandaran, and had Ali and his brother Yazdagird imprisoned. Meanwhile, in Mazandaran, Ali's brother Bahram and his nephew, Faramurz were struggling for the Bavandid throne. Muhammad shortly died, and was succeeded by his son Mahmud II who released Ali from prison, gave him his aunt in marriage, and recognized him as the ruler of the Bavand dynasty. Faramurz agreed to recognize the authority of Ali, but Bahram resisted, until he was defeated. Bahram then fled to the court of Mahmud II, and requested his help. Mahmud supported Bahram for sometime, but later stopped doing so. Bahram then tried unsuccessfully to make the Ismailis murder Ali.

In 1119, Ahmad Sanjar, with the aid of the Kakuyid ruler Garshasp II and several other minor rulers, invaded Jibal and forced Mahmud II to cede him Mazandaran and other parts of western Iran. Bahram then joined Ahmad Sanjar. Ahmad Sanjar then ordered Ali to meet him at his court. Ali, however, disobeyed, and instead sent his son Shah Ghazi Rustam IV, who was also related to Ahmad Sanjar from his mother's side.

Ahmad Sanjar was angered by Ali's action, and later sent Shah Ghazi Rustam back to Mazandaran. Ahmad Sanjar then recognized Bahram as the ruler of Mazandaran, and gave him an army to conquer the region. Ali immediately lost the support of many of his supporters, but those who remained loyal to him helped him to repelled Bahram. Bahram then withdrew to Nishapur, where he stayed with the amir Öner, until the latter was murdered by the Ismailis in 1121. Bahram then fled to Ghiyath ad-Din Mas'ud, who had recently become the ruler of Gorgan and promised to aid him in his conquest of Mazandaran. However, Ali managed to have Bahram assassinated in 1122.

In 1127, Ahmad Sanjar once again invaded western Iran, and Ali this time obeyed Ahmad Sanjar's summons, but did not meet with Ahmad Sanjar when he was informed of serious opposition from the latter's nephews. Ahmad Sanjar shortly returned, and once again ordered Ali to meet him, but the latter once again refused and used his advanced age as an excuse. Ali then instead sent one of his sons to Ahmad Sanjar. Ahmad Sanjar, once again enraged by Ali's refusal to obey, sent an army under amir Arghash to capture Shahriyarkuh, but Ali managed to defeat the army before it managed to reach the city. Ahmad Sanjar then inspired amir Chavli to invade Mazandaran. During the same time he offered his nephew Ghiyath ad-Din Mas'ud the opportunity to annex Shahriyarkuh. Ghiyath, however, was twice defeated by near Tamisha. Arghash was shortly ordered to return to Mazandaran to avenge the embarrassing Seljuq defeats, and besieged the Bavandid fortress of Ruhin for eight months but was forced to withdraw. Mahmud II later died in 1131, and a civil war later ensured between various Seljuq princes. Ahmad Sanjar was then forced to summon Arghash to aid him in an expedition in western Iran. He then pardoned Ali and ordered him to join him in western Iran. Ali, however, sent his son Shah Ghazi Rustam IV instead, who distinguished himself during the expedition and was wounded at the Battle of Dinavar where Ahmad Sanjar was victorious. Ahmad Sanjar then granted Shah Ghazi Rustam IV several honors and allowed him to return to his father in Mazandaran. However, Ahmad Sanjar's relations with Ali still remained tense. After the death of Ali's wife, Ahmad Sanjar, who was her brother, demanded the properties she had left in Mazandaran which was in reality given to Ali. Ahmad Sanjar then sent the ispahsalar Muhammad Kashi to take it. Ali, however, managed to persuade Ahmad Sanjar to share the properties with him.

During the later years, several deposed rulers and princes took refuge in Mazandaran. Some of these included the Seljuq prince Toghrul II, who later managed to conquer Jibal with the aid of Ali. Several other deposed rulers and princes took refuge in Mazandaran, including the Ghaznavid Shirzad ibn Mas'ud III, two sons of the Khwarazmian Qutb al-Din Muhammad, and a member of the Mazyadids.

Some time later, Ahmad Sanjar ordered Abbas, the amir of Ray, to invade Mazandaran. Abbas managed to enter Amol, but after a short time he made peace with Ali. In 1141/1142, the Khwarazmian ruler Atsiz invaded Khorasan and seized Gorgan from Ali. He then imprisoned the local Bavandid governor Rustam Kabudjama. Shah Ghazi Rustam IV, without the agreement of his father, then met Atsiz, and persuaded him to release Rustam Kabudjama. Ali, after hearing about his son's meeting with Atsiz, criticized his actions. Some time later, Ali, who was too old to rule, abdicated in favor of his son Shah Ghazi Rustam IV. Ali died three years later in Tamisha and was buried in Sari.