Moulay Idriss el Akhbar (The Great) was a great-grandson of the Prophet Mohammed; his grandparents were Mohammed’s daughter Fatima, and his cousin and first follower, Ali. Heir to the Caliphate in Damascus, he fled to Morocco around 787 AD, following the Ummayad victory in the great civil war that split the Muslim world into Shia and Sunni sects.
In Volubilis, then still the main centre of the north, Idriss seems to have been welcomed as an imam (a spiritual and political leader), and within a few years had succeeded in carving out a considerable kingdom. At this new town site, more easily defended than Volubilis, he built his capital, and he also began the construction of Fez, continued and considerably extended by his son, Moulay Idriss II, that city’s patron saint. News of his growing power filtered back to the East, however, and in 791 the Ummayads had Idriss poisoned, doubtless assuming that his kingdom would crumble.
They were mistaken. Alongside the faith of Islam, Idriss had instilled a sense of unity among the region’s previously pagan (and sometimes Christian or Jewish) Berber tribes, which had been joined in this prototypical Moroccan state by increasing numbers of Arab Shiites loyal to the succession of his Alid line. After his assassination, Rashid, the servant who had travelled with Moulay Idriss to Morocco, took over as regent until 805, when the founder’s son was old enough to assume the throne of what was Morocco’s first independent kingdom.