Although Shi'as have lived in Iran since the earliest days of Islam, the writers of the Four Books of Shi'a ahadith were Iranians of the pre-Safavid era and there was one Shi'a dynasty in part of Iran during the tenth and eleventh centuries, according to Mortaza Motahhari the majority of Iranian scholars and masses remained Sunni till the time of the Safavids.[27]