This research deals with the different branches of the religious sciences in Al-Maghreb and al-Andalus, according to the "Muqaddema" of Abdul Rahman Ibn Khaldun(d.808A.H/1406A.D), who mentioned that those countries witnessed, during their early Islamic history, extraordinary progress in all intellectual and scientific aspects including, among others, religious studies. This progress extended over the period from the end of the Islamic conquest of North Africa and Al-Andalus, even the calamities in Tunisian and Algerian countries, especially in the city of Kairouan because of Hilalian migrations during the fifth A.H\eleventh A.D century, and the disaster which occurred in Al-Andalus after the Spanish occupation of Cordoba in 633A.H\1236A.D.
According to Ibn Khaldun; Kairouan and Cordoba were the center of cultural prosperity in Al- Maghreb and Al-Andalus, but the destruction of Kairouan, then the fall of Cordoba led to the destruction of their "Urbanism", then had a negative impact on the scientific and cultural conditions in all cities of both countries. That came compatible with Ibn Khaldun's perception of the importance of central spatial of these cities as central places for science and education, which was part of his theory of "Urbanism". According to his theory; If these cities are progressing and prospering, then the entire country would be thriving. That's why it was not extraordinary that most of the scientists and intellectuals he mentioned belong to the early periods of those countries.
Despite the pessimism expressed by Ibn Khaldun about science and education in the Al-Maghreb and al-Andalus during his time, authoring movement did not stop in various branches of religious studies, but continued with slower momentum. It included sciences of Koran, Hadith, Fiqh, Al- Mawareeth, Revelation's Interpretation art, which was considered by Ibin Khaldun as one of religious sciences. Therefore, he did not ignore many of those who contributed in maintaining and supporting education and religious studies in Al- Maghreb and al-Andalus after the destruction of Kairouan and the fall of Cordoba.
All of that led to the maintainance of the Sunni doctrine unity, which is the essence of the doctrine of Imam Malik ibn Anas. They relentlessly fought the Shiite and other sects in defence of the Sunni people and their scholars, and this led to the protection of the Sunni doctrine from fragmentation which prevailed in the Levant. That also was because of Andalusian and Maghrebian scientific trips to the Levant, and the continuous religious communication that never stopped, between Al-Maghreb and Al-Andalus, with the encouragement of the successors and princes of both countries.