the Sallarids. Marzuban's brother and the Sallarid ruler of Dailam, Wahsudan, shortly sent an army under the Kurdish general Daisam, but the latter was forced to retreat to Arran. Furthermore, the vizier of Daisam, Ibn Mahmud, betrayed him and joined Abu Mansur, who managed to successfully conquer Azerbaijan. Ibn Mahmud was shortly appointed by Abu Mansur as his minister. However, an unnamed secretary of Abu Mansur, who had greatly helped him during his conquest of Azerbaijan, felt insulted that he had chosen Ibn Mahmud as his minister instead of him, and shortly raised an army, and joined Daisam. Meanwhile, Abu Mansur, who was not used to the environment of Azerbaijan, left the region with Ibn Mahmud, and returned to Ray. Later service under the Samanids and death In 950/951, Abu Mansur returned to his native Khurasan, where he was pardoned by Nuh II, and was reappointed as the governor of Tus. In 953, Abu Mansur played a prominent role in the peace treaty between Nuh II and Rukn al-Dawla. He later wanted to create a Shahnameh ("Book of Kings"), and ordered his new minister Abu Mansur Mamari to invite several scholars in order to create the book; they created a New Persian version of the Khwaday-Namag in 957, and expanded it with other sources. The book became known as Shahnama-yi Abu Mansuri ("The book of kings of Abu Mansuri"), and was later the main source of Shahnameh of the famous Iranian poet and Abu Mansur's friend, Ferdowsi. However, only the introduction of the book remains today. Nuh II died in 954, and was succeeded by his son Abd al-Malik I. Meanwhile, Turkic officers began increasing their power and influence, thus resulting in instability in the Samanid state. Abu Mansur was later appointed as the sipahsalar of Khurasan. 6 months later, however, he was replaced by the Turkic general Alptigin, and shortly returned to Tus. Abd al-Malik later died in an accident in 961, which resulted in a succession crisis; The faction of Alptigin and Muhammad Bal'ami wanted Abd al-Malik's young son Nasr as the new Samanid ruler, while a faction of the Turkic general Fa'iq and several prominent Iranian statesmen, wanted the latter's brother Mansur I as the new Samanid ruler. Fa'iq eventually managed to emerge victorious, and Alptigin rebelled, while Mansur I was crowned as the ruler of the Samanids. Abu Mansur was shortly appointed as the sipahsalar of