Abu al-Qasim al-Zayyani () or, in full, Abu al-Qasim ibn Ahmad ibn Ali ibn Ibrahim az-Zayyani (1734/35–1833) was a Moroccan historian, geographer, poet and statesman from the Berber Zayane tribe in Morocco. He undertook diplomatic missions to the Ottoman court and engineered government attempts to bring tribes under central authority. His writings include several historical accounts of the Ottoman and Alaouite dynasties. Az-Zayyani wrote fifteen works in the field of history and geography. Some authors even consider him the greatest historian of Morocco. Origins Az-Zayyani has left his genealogy which, according to his grandfather, goes back to Sanhaj, the ancestor of the Sanhaja tribes, by Zayyan, the eponymous ancestor of the tribe itself, by Amalu, father of Zayyan and by al-yasa', who would have converted to Islam in the reign of the Umayyad Caliph abd al-Malik ibn Marwan (eighth century AD). He cites as the guarantor of this ancestry the great Berber genealogist Sabiq ibn Sulayman al-Matmati. Biography On his return from the journey he made among the Zayyans in 1689, the Alaouite Sultan Isma'il brought back to Meknes az-Zayyani's grandfather, who became his Imam and died in this city the same year as him 1727. His son Ahmed then moved to Fez, where the future historian (az-Zayyani) was to be born eight years later. Abu'l-Qasim az-Zayyani was born in Fes in 1734/35. He was from the zayyan tribe, a big Berber tribe in Moroccan Middle Atlas, where his grandfather Ali ibn Ibrahim who was a Jurisconsult and a valuable genealogist lived in the zawiyya of Aroggo, near Adekhsan. Among his grandfather's work was a book on Berber genealogy. Abu'l-Qasim made his Islamic studies in Fes, which he completed in 1785. He was then twenty-three years old. He had taken courses in the mosques of al-Qarawiyyin and al-Andalusiyyin and frequented the two madrasas of al-Sahrij and al-'Attarin. His principal masters were, first of all, Ahmed ibn at-Tahir ach-Chargi, then the biographer Muhammad ibn at-Tayyib al-Qadiri, Abd al-Qadir Boukhiris, Mohammed Bennani, and above all the famous jurisconsult Abu Hafs 'Umar al-Fasi, to the lessons of which were pressed the already known ulama, like Abd as-Salam Hassin, al-'Arbi al-Qosantini, Muhammad Sahnun, al-Walid al-'Iraqi, Yahia ach-Chafchawani, Muhammad al-Huwwari and Muhammad ibn Abd as-Salam al-Fasi. During the reign of Sultan 'Abd Allah, the year in which his studies ended, az-Zayyani accompanied his father and mother, who had resolved to accomplish the pilgrimage; He was