In time, a tradition evolved by which Islam was made to appear as a partly Iranian religion. One example of this was a legend that Husayn, son the fourth caliph Ali and grandson of Islam's prophet Muhammad, had married a captive Sassanid princess named Shahrbanu. This "wholly fictitious figure"[17] was said to have borne Husayn a son, the historical fourth Shi'a imam, who claimed that the caliphate rightly belonged to him and his descendants, and that the Umayyads had wrongfully wrested it from him. The alleged descent from the Sassanid house counterbalanced the Arab nationalism of the Umayyads, and the Iranian national association with a Zoroastrian past was disarmed. Thus, according to scholar Mary Boyce, "it was no longer the Zoroastrians alone who stood for patriotism and loyalty to the past."[17] The "damning indictment" that becoming Muslim was equivalent to becoming Un-Iranian only remained an idiom in Zoroastrian texts.[17]
With Iranian (especially Persian) support, the Abbasids overthrew the Ummayads in 750, and in the subsequent caliphate government—that nominally lasted until 1258—Muslim Iranians received marked favor in the new government, both in Iran and at the capital in Baghdad. This mitigated the antagonism between Arabs and Iranians, but sharpened the distinction between Muslims and non-Muslims. The Abbasids zealously persecuted heretics, and although this was directed mainly at Muslim sectarians, it also created a harsher climate for non-Muslims.[18] Although the Abbasids were deadly foes of Zoroastrianism, the brand of Islam they propagated throughout Iran became in turn ever more "Zoroastrianized", making it easier for Iranians to embrace Islam.
The 9th century was the last in which Zoroastrians had the means to engage in creative work on a great scale, and the 9th century has come to define the great number of Zoroastrian texts that were composed or re-written during the 8th to 10th centuries (excluding copying and lesser amendments, which continue for some time thereafter). All of these works are in the Middle Persian dialect of that period (free of Arabic words), and written in the difficult Pahlavi script (hence the adoption of the term "Pahlavi" as the name of the variant of the language, and of the genre, of those Zoroastrian books). If read aloud, these books would still have been intelligible to the laity. Many of these texts are responses to the tribulations of the time, and all of them include exhortations to stand fast in their religious beliefs.