When Ja'far died in 312/925 the Dailamite leaders in Amul put a son of Ahmad, Abu 'All Muhammad, on the throne. The constant quarrels among the 'Alids had indeed greatly strengthened the hands of the Dailamite and Gilite chiefs, who more and more were able to use the 'Alids as pawns in their own power struggle. Two Dailamite leaders soon emerged as the main rivals in this struggle: Makan b. Kakl and Asfar b. Shiruya. Makan and his cousin al-Hasan b. al-Fairuzan conspired in favour of a young son of Ja'far, Isma'il, who was a half brother of al-Hasan through his mother. They seized Abu 'All and put Isma'il on the throne. Abu 'All succeeded, however, in killing the brother of Makan, who was supposed to kill him, and gained the support of Asfar. Makan was defeated and fled to the highlands, while Abu 'All returned to reign. Within months he was killed in an accident and was succeeded by his brother Abu Ja'far Muhammad.
As his reign was weakened by the revolt of Asfar, Makan in 314/926 descended from the highlands and expelled him from Amul. The Da'i, who had not responded to earlier overtures of Makan, now joined him from Gilan and was once more restored to the rule of Tabaristan, while Abu Ja'far found refuge in the highlands. In 316/928 the Da'i and Makan set out on an ambitious campaign and conquered Ray and the province of Jibal as far as Qum. Asfar, who governed Gurgan under Samanid suzerainty, used the occasion of their absence to invade Tabaristan. The Da'i, without Makan, returned and met Asfar at the gate of Amul. As his army was routed, the Da'i was mortally wounded by Mardavij b. Ziyar, who had entered the Samanid service even before Asfar and thus avenged the murder of his uncle Harusindan. Asfar then defeated Makan at Ray, and the latter fled to Dailaman.