During the rivalry between the Ummayyads of Spain and the Fatimids in the 10th century, Fez and northern Morocco came under the domination of the Zenata Berbers, who deposed the Idrisids in 917-921.[1] Moussa ibn Abi al-'Afya, whom the Zenata placed in charge of Fez, persecuted the descendants of Idris, drove them out of the city, and took measures to discredit their reputation.[2][7] Among other things, he publicly denied that the Shurafa Mosque contained the real tomb of Idris II, promoting the story (reported in some sources) that Idris II had instead been buried next to his father in the town of Moulay Idriss Zerhoun (about 50 kilometers west of Fez).[5] Finally, at some point around this period the khutba (Friday sermon) was transferred to the al-Qarawiyyin Mosque, thus robbing the Shurafa Mosque of its status as the community's main mosque.