1. Introduction
This paper does not analyze the history of education in the chosen periods, but provides some “ideas”, as put in the tittle of the study, on the function of education during these periods. It should also be noted that the choice of these periods is due to the fact that any attempt made to show the two models of sanctity in the Islamic West in the periods studied is derived from hagiographic sources. The cases of Abū Ya`azzā, al-Yuḥānisī, and al-Mājarī constitute proof of this. Such conclusions have never been reached before (
El Hour 2019;
El Hour and Vázquez 2024).
The choice of the Almohad period is due to several reasons, but mainly due to the fact that the educational landscape in this period is somewhat better documented than previous periods. It is believed that the Almohad period represents a major change in this regard. However, we study this period, because it is in this period that a specific educational model linked to the world of sanctity began to be defined. This is the Maghrebi model, different from the Andalusian one, evidenced by the existence of extensive hagiographic literature, if we compare it with previous periods.
The system of education and teaching reflects the ideology of the states, and even that of their political and religious systems. The Almohads were no exception in this regard, as they paid great attention to this aspect, especially under the leadership of the movement’s founder, who used his position as a teacher and intellectual to create an army of intellectuals and disciples, who would later manage all state affairs. Ibn Tūmart was fully aware of the critical importance of education in spreading propaganda for his ideology, but more importantly, his ideas attracted many followers, even blind followers, who would ensure the success of the movement and, thus, the viability of an empire that lasted for a considerable time, especially when compared to its Almoravid predecessors. After the death of Ibn Tūmart in 524/1130, the caliph ‘Abd al-Mu’min took charge of the Almohad State, “though not as the Mahdi, but as the head of the resulting political movement. ‘Abd al-Mu’min took on the task of reorganizing the political structure and followed the plans laid out by the leader of the movement, giving great importance and priority to the educational system and teaching, which were considered fundamental tools for the ideological construction of the new state. As a preview, it should be noted that the work
Al-Tawḥīd by al-Mahdī Ibn Tūmart, the foundational text of Almohad doctrine, was taught in both Arabic and Berber in Andalusian mosques. The Almohads entrusted the task of learning, preserving, and teaching the doctrine to the most important group of officials in the empire, the
ḥuffāẓ, who were granted many privileges” (
Viguera 1992, p. 240). In the Marinid and Naṣrid periods, the situation changed, mostly due to the introduction of public schools (
El Hour 2019). The studied cases of Abū Ya`zā, al-Mājarī, and al-Yuḥānisī allow us to see not only the changes in the educational and intellectual formation process in al-Andalus and Maghreb, but also the religious identity of each educational model.
2. Historical Overview of Education in Maghreb and al-Andalus
This paper highlights some characteristics of the education, educational institutions, and teaching languages, among other aspects, during the Almohad, Marinid, and Naṣrid periods. The presence of references to earlier periods is simply due to the fact that it is difficult to appreciate the mechanisms of education during the studied periods without taking into account those existing in earlier times. This allows us to closely follow the function, or rather, the specificities of the periods studied in this article.
Several Maghrebi sources discuss the topic of teaching and education, reflecting, among other things, a significant concern for this aspect. Among these sources is the work of Ibn Saḥnūn, titled
Kitāb adāb al-mu‘allimīn (
Ibn Saḥnūn 1972), considered one of the earliest sources addressing this issue. Then there is the work of al-Qābisī,
Al-Risāla al-mufaṣṣala fi aḥwāl al-mu‘allimīn wa-l-muta‘allimīn, to which I will refer later, and the work of al-Magrāwī titled
Jāmi‘ jawāmi‘ al-ikhtiṣār (
Al-Maghrāwī n.d.), not to mention the
Risāla by Ibn Ḥabīb (d. 238/852), directed to his son’s teacher, which is mentioned by the aforementioned al-Mghrāwī. In addition to these works, there are others that include numerous references to teaching and education, such as the
Madkhal (
Ibn al-Hājj n.d.) by Ibn al-Hājj (d. 737/) or
Kitāb al-siyāsa aw al-ishāra fi tadhbīr al-imāra (
Al-Ḥaḍramī 2003) by Abū Bakr al-Ḥaḍramī (d. 489/). To this must be added the role of the Sufis in teaching and providing free education through their lessons and writings. We will not delve into the importance of Sufi teaching, which has been crucial in the Islamization of the Maghreb and the consolidation of Islam there, partly due to the Sufis’ closeness to the population and their focus on basic teachings, far removed from the complexities of
fiqh.
Al-Risāla al-mufaṣṣala fi aḥwāl al-mu‘allimīn wa-l-muta‘allimīn by al-Qābisī is one of the most important sources dealing with teaching and education in the Islamic West. It is a kind of treatise or epistolary work on teachers and disciples. This 10th-century Tunisian work makes it clear that education was outside the purview of governments, and there is no evidence that Muslim leaders appointed teachers or provided them with any salary. Instead, the education of children or those under their responsibility was handled by the parents and guardians of the students. Some political gestures, such as those of Caliph `Umar b. `Abd al-‘Azīz, who sent a group of Eastern teachers to the Maghreb to teach Islam to North Africans, or the invitation by Almohad Caliph ‘Abd al-Mu’min to a group of Andalusian teachers to North Africa, did not imply an official intervention in education (
Askān 2006, p. 16). Ibn Saḥnūn, for his part, discusses the salaries of teachers and everything related to lessons and children, placing the financial responsibility for these lessons entirely on the parents of the students (
Ibn Saḥnūn 1972, p. 119).
There is substantial evidence regarding the responsibility of parents in funding their children’s education, both within and outside the Islamic West. This primarily refers to parents with financial means, in addition to the ruling elite. We will limit ourselves to providing some examples of such parents. The sources offer data on cases where parents accompanied their children to study either within or beyond the Islamic West due to the significant financial burden that education entailed; meanwhile, those without resources awaited the arrival of great teachers in the Maghreb, such as a certain Abū l-Ḥajjāj b. Namawī (d. 614/1218). The sources consulted provide various instances that attest to the high costs of education. Notably,
Ibn Farḥūn (
n.d., p. 357) mentions an individual named Abū `Umar Yūsuf al-Magāmī al-Andalusī, who spent more than two thousand dinars during an eleven-year stay in the East and returned in debt. Other students, such as al-Bāǧī (d. 476/) (
Ibn Farḥūn (
n.d.), p. 120), had to work to finance their education. Some engaged in trade or traveled with family members to help cover expenses, like Muhammad b. Imran al-Mazdaghī (d. 653/1256), who traveled to al-Andalus accompanied by his father, a merchant (
Al-Wazzān 1983, p. 261). Studying in the Islamic West was far from easy, especially for the common population, which, at best, could only afford to pay for elementary education—such as Quranic schools—in kind or relied on the hope that a teacher would provide free lessons, as was the case with Abū l-‘Abbās al-Sabtī. I shall not insist that medieval education was elitist, particularly in the Maghreb, at least until the arrival of the Marinids.
During the Almohad period, the payment of teachers’ salaries was not limited to the primary stage, that of Quranic schools, but included the subsequent stage as well. It is recorded that some teachers were compensated for their classes, such as Muhammad b. al-Khaḍb (d. 583/1188), who lived in Fez and was strict about receiving payment for his lessons. Ibn `Abd al-Malik al-Marrākushī reports that this teacher was involved in extraordinary stories related to this matter (
Al-Marrākushī 1984, p. 649). The attitude of this teacher resembled that of a certain Alī Muḥammad b. Kharūf al-Ḥaḍramī (d. 609/1213), who engaged in trade between al-Andalus, Ceuta, Fez, and Marrakech. He dedicated himself to teaching in all the locations he visited and did not excuse anyone from paying for his lessons (
Al-Marrākushī 1984, pp. 319–23); he made no distinction between wealthy and poorer students, unlike most teachers, such as Abū l-Abbās b. al-Arīf al-Sabtī (d. 601/1205), who taught grammar and arithmetic in Marrakech, charged for his lessons, and spent his earnings on poorer students, as noted by
Aḥmad Bābā Al-Timbuktī (
n.d., p. 16;
Al-Tādilī 1984, p. 455).
Arabic sources indicate that, thanks to their teaching, some teachers accumulated considerable wealth, providing various examples. Muhammad al-Asqar amassed over 700 dinars in three years from his Quran classes (
Ibn al-Qāḍī 1972–1973, p. 216). Abū `Umr al-Shalubīn (562–645/1167–1248) taught fiqh for more than 60 years and, as a result, accumulated great wealth. Each student paid 400 dirhams monthly (
Al-Marrākushī 1984, pp. 562–63); the same was true for `Alī b. Yūsuf al-Anṣārī (d. 619/1223).
In al-Andalus, there are several examples from the Almohad period. Notable figures include the Cordoban `Alī b. Muḥammad al-Fahmī, who was the teacher of the daughters of Caliph al-Manṣūr and managed to charge 500 dirhams daily. Because of this, he accumulated considerable wealth and assets, as pointed out by Ibn `Abd al-Malik (
Marín 2000, pp. 650–52). The Almohads also hired female teachers such as Ḥafṣa bint al-Ḥājj al-Rakūniyya (d. 586/1190), who taught women at the court of Ya`qūb al-Manṣūr. Education also included the servants and slaves of the court.
It is clear that the sources predominantly highlight the education of the elite; conversely, poorer students appear in the sources mainly due to the prominence of the teacher. Some sources warn of the equitable treatment between wealthy and poor students (
Ibn Saḥnūn 1972, p. 83). This fact itself may help us deduce the significant obstacles that the poor faced in their education.
3. Some Examples of Women’s Education
I would like to point out that I will not make any gender analysis but will simply offer some ideas about the teaching of “some” elite women. We do not intend to make a structural analysis of female education in the Islamic West; Dr. Manuela Marín, took care of that in in her excellent book, Las mujeres en al-Andalus, Madrid, CSIC, 1999.
I would like to emphasize that, although the
fuqahā’ preferred to educate women because they are entitled to the same rights to education as men, some disapproved of them learning the same subjects, particularly writing, as they believed it could be detrimental to their well-being (
Al-Qābisī 1986, p. 292). For this reason, their education was limited in comparison to that of men.
The education of women included individuals from various classes, but I will focus on the following two: those from ruling families and those from scholarly families (
Ibn Saḥnūn 1972, p. 37) of urban means, as noted by Ḥusayn
Askān (
2006, p. 36). I find the author’s classification to be quite interesting. In the case of the first class, some daughters of governors, depending on their position within the hierarchy of authority, were known for their extensive knowledge, particularly the daughters of ruling families. Some daughters from such families achieved significant status in the world of knowledge, becoming learned women or
‘alimas in subjects such as literature, like Zaynab, the daughter of Caliph Ya`qūb al-Manṣūr, who also excelled in theology or
‘ilm al-kalām (
Askān 2006, p. 36). However, the women who benefited most from education were those of the previous period, namely, the Almoravid women. Access to education allowed them to attain a high social standing, in some cases surpassing that of men. We should pay attention to the testimony of al-Ḥasan al-Wazzān (
Al-Wazzān 1983, p. 116), as he reports that in the Ṣanhājī city of Tassit, women were the ones who learned and served as teachers in schools for both boys and girls.
As for the second class, that is, women from urban families, efforts were made to ensure that these women learned all the sciences that men studied. For instance, the daughter of the founder of the first school in Ceuta, Abū l-Ḥasan al-Shārī (d. 649/1252), received lessons in hadith from her father and became an expert in its transmission. Women played a crucial role in teaching children, especially in basic subjects such as the Quran and hadith, among others.
We have records of a significant number of learned women in both the Maghreb and al-Andalus. The vast majority of them, as M. Marín states (
Marín 2000, p. 651), “acquired their knowledge through family connections; their teachers were, at the same time, their fathers, brothers, or husbands. There are references to women teaching other women or to the presence, in royal palaces, of female teachers who educated the daughters of princes. Sayyida bint `Abd al-Ghanī (d. 647/1249), an expert in the Quran with excellent calligraphy, dedicated her entire life to this work, and was replaced by her two daughters when necessary. Both types of education—teaching through
maḥram relatives or by learned women—confirm the tendency towards gender segregation in the dissemination of knowledge” (
Marín 2000, p. 651). However, there is other information suggesting that such segregation was relative, although the separation between male and female students remained a taboo, as advised by all the Arabic sources that discussed the topic.
When discussing the education of women in the Islamic West, several names of notable teachers emerge, such as the Sevillian Muḥammad b. Abī Bakr al-Azdī Ibn al-Fakhkhār (d. 640/1242–43), who was described as “an expert in
‘ilm al-kalām and dedicated to teaching”. His biography states, “God enabled many people, both men and women, to benefit from him (in teaching) until his death at an advanced age” (
Marín 2000, p. 651), as well as Muḥammad b. Aḥmad b. Abī l-Qāsim al-Anṣārī (
Marín 2000, p. 651), an ascetic from Jerez who focused on the education of women (
ta’dīb al-nisā’).
To conclude this section, it is worth mentioning the account provided by Ibn Abd al-Malik regarding the Cordoban Alī b. Muḥammad b. Yūsuf b. `Abd Allāh al-Fahmī (d. 618/1221–2), whose biography reflects the significance of virtue as a fundamental condition for teaching women, particularly women of the court, as in this instance. Let us pay attention to what the author of Dayl tells us.
Ibn `Abd al-Malik informs us that “al-Fahmī resided in Salé and later in Marrakech […] He had memorized the Quran, was an expert in the Quranic readings, and possessed a remarkably beautiful voice that was a miracle from God […] One day, the Almohad caliph al-Manṣūr passed by him while he was, as was his custom, reciting the Quran in a cemetery, and he was captivated by the excellence of his singing and the goodness of his purpose. He had him brought before him, incorporated him into his service, and ordered him to teach his children and to recite the Quran during Ramaḍān […] After learning of his chastity and virtue, he ordered him to teach his daughters as well. He declined, citing that he considered it appropriate to maintain a certain separation between the genders. This endeared him even more to the caliph, as it demonstrated the sincerity of his intentions; he was then compelled to teach them (the daughters)” (
Marín 2000, p. 652;
Al-Marrākushī 1984, p. 674).
Regarding women from other social classes, parents often sent them to Quranic schools (katātib) to learn the Quran and writing (despite the opposition of some fuqahā’). The daughters from other classes who could afford their education typically studied religious sciences more than other subjects, especially the learning and memorization of the Quran and fiqh, while other subjects, such as linguistic, philological, and rational sciences, did not hold much interest for them, except for those that helped them understand legal sciences or that had some relation to astronomy due to its importance in measuring time.
4. The Role of the Berber Language in the Maghreb’s Education
In recent years, many studies have been conducted on the use of the Berber language in the medieval Maghreb. My intention is not to repeat what has already been said in these studies but rather to emphasize the most noteworthy points. It is important to mention that, from a linguistic perspective, the Almohads followed the same policy regarding the “political” use of the Arabic language as the Almoravids, not only for their unifying political project but also for the development of their institutions, especially the chancery and state secretariats, not to mention the efforts of Almohad historiography in seeking the Arabic origins of the movement’s founder (
Fierro 2016, pp. 73–97;
Lévi-Provençal 1932, pp. 30–45;
Marcy 1932, pp. 61–77).
However, for the propagation of their doctrine, the Almohads employed, in addition to the Arabic language, the Berber language. Arabic sources highlight not only Ibn Tūmart’s (
Lévi-Provençal 1932, pp. 30–45;
Marcy 1932, pp. 61–77) use of Berber in his speeches and sermons but also assert that knowledge of the Berber language was essential for holding the position of
khatib in the mosques of the city of Fez (
Al-Jiznā’ī 2008, p. 56).
The Almohads are characterized by their bolder management of linguistic matters compared to the Almoravids. The Mahdī b. Tūmart followed a path that ensured the effective propaganda of his ideas among the
maṣmūda. For this reason, his works directed at his followers were written in
lisān al-garbī. (“Western tongue”), also referred to as
al-lisān al-a`jamī, al-lisān al-maṣmūdī, al-magribī, or al-barbarī. Ibn Tūmart was particularly eloquent in expressing himself in this language, as noted by al-Marrākushī
and the author of al-Ḥulal al-Mawshiyya (
Al-Marrākushī 1978, p. 274;
Ibn Simāk 1979, p. 110).
His first decision was to impose Al-Tawhīd (“Unity”) in the Berber language, which consisted of seven chapters, and he ordered that one chapter (hizb) be read each day after the ṣubḥ prayer, following the obligatory prayer and the reading of the hizb of the Quran (
Ibn Simāk 1979, pp. 109–10). The author of al-Ḥulal al-Mawshiyya adds that Ibn Tūmart composed two more works, one titled Al-Qawā`id (“The Rules or Norms”) and the other titled
Al-Imāma (Imamate) or religious leadership, which remains accessible to the people to this day (composed in both Arabic and Berber), as stated by the author of
al-Ḥulal al-Mawshiyya (
Ibn Simāk 1979, p. 110). Ibn Khaldūn makes it clear that Ibn Tūmart was highly interested in personally teaching his works in Berber (
Ibn Khaldūn 2006, p. 268). With this duality between Arabic and Berber, Ibn T ū mart aimed to convey his sermons and advice, facilitating the task for his followers.
This linguistic duality of Ibn Tūmart did not disappear with his death but continued with his successors, aiming to maintain contact with the population regarding religious and worldly matters. `Abd al-Mu’min himself took it upon himself to teach some aspects of Ibn Tūmart’s works and ordered those who spoke Berber to read
Al-Tawḥīd of Ibn Tūmart in that language (
Lévi-Provençal 1932, pp. 132–37). One of the Almohad customs highlights that when the caliph traveled, a group of
ṭalaba would read the Quran,
hadith, and
‘aqā’id in the Berber language (
Al-Marrākushī 1978, pp. 484–85).
Hagiographic sources can help us formulate some ideas about the use of the Berber language in religious education, particularly in the rural Maghreb. Despite the limited information about the Berber language in these sources, it is evident that this language was present. Many stories provided by these sources confirm that some of the venerated Sufi saints, such as Abū Ya‘azzā, one of the emblematic figures of Maghrebi sanctity during the Almohad period, not only frequently spoke Berber but also did not know Arabic, requiring the people to address him through a translator, as noted by al-`Azafī (
El Hour 2014, pp. 288–98). It is important to emphasize the role the Berber language played in the propagation of Islamic teachings and its consolidation among Berber communities. In contrast, in al-Andalus, “public interventions of any kind had to be conducted in both languages, in Berber for the Almohads and in Arabic for the Andalusians” (
De Felipe 1997, pp. 359, 434).
The information about the language of instruction during the medieval period provided by the sources is scarce, except for a few indications that help us understand that Arabic was not the language of instruction, despite becoming the language of religion, administration, and science following the Islamic conquests. It seems that the language of instruction was Berber, and likely the dialect that emerged in some Arabized cities in northern Morocco. As we know, Ibn Tūmart taught in Berber at the Ribat of Harga in the early 6th century AH/12th century CE, and later in Tinmāl, in the Darn mountains (
Askān 2006, p. 116). Other examples confirm the use of the Berber language in education in the Maghreb, such as that of the Andalusian disciple who said that “the teacher named Salim b. Salama al-Susi (d. 586/1191) excelled in teaching the
Mudawwana in Berber in Sijilmāsa. (
Ibn al-Abbār 1955, p. 124)”. This testimony also makes it clear that the Andalusian disciple was proficient in Berber.
Other indications of the use of Berber in education can be found in the aspects related to education that have been passed down to us from the Almohad period. For example, the use of the word
tinmal instead of the Arabic word
madrasa or school, from which the Almohad movement originated; they also used the term
anmāl to refer to the teacher, which is the name of a
zawiya in the city of Taza (Zāwiyat Anmāl) (
Askān 2006, p. 116).
Hagiographic literature provides a rich source of material in this regard. We have records of various cases of saints delivering sermons in Berber in the
ribāṭs, such as the Ribāt of Tīṭ, which attracted many people from all over; Abū Waljūṭ Tunār al-Wajurrām al-Hazmīrī taught the
wa`ẓ in Berber to the
maṣāmida in various
ribāṭs, among others (
El Hour 2019). Thus, a better understanding of education in the Islamic West, especially in the Maghreb during the Almohad period, is only possible and feasible if the Berber language is considered.
5. Sanctity and Education
Although I have previously undertaken a detailed study of the education and formative processes of saints (awliyā’) in the Islamic West, I find it necessary to briefly revisit this topic here. My comparative analysis of the intellectual development of several Maghrebi saints has yielded conclusions of significant scholarly interest. This type of analysis, to the best of my knowledge, has never been conducted before, which justifies the inclusion of this section.
The examination of the specific cases of Abū Ya`azzā and al-Yuḥānisī—two saints, Maghrebi and Andalusian, respectively—reveals the existence of two distinct educational models. Abū Ya`azzā belongs to the Maghrebi model, characterized by the strong influence of Berber language and culture, whereas al-Yuḥānisī represents the Andalusian model, deeply rooted in Arabic language and culture.
According to all available sources, Abū Ya`azzā had no formal education in his childhood and lacked proficiency in the Arabic language, which excluded him from accessing Arabic sciences—whether linguistic, cultural, or religious. Yet, these limitations did not prevent him from attaining recognition as a major spiritual authority across the Islamic West (
El Hour 2019, pp. 103–33;
2014, pp. 88–98). Abū Ya`azzā was mentor to prominent figures of Maghrebi sainthood, such as Abū Madyan al-Gawth, among others who excelled both as scholars and saints (
El Hour 2019). Notably, Abū Ya`azzā and Abū Madyan met in person, and their dialogue was facilitated by a translator as Abū Ya`azzā addressed the Andalusian saint in Berber (
El Hour 2007, p. 37;
2021, p. 187).
What makes Abū Ya`zā particularly remarkable is his rootedness in his village; he neither undertook the ḥajj nor participated in the customary scholarly travels (riḥla). He is a quintessential example of the Maghrebi-Berber educational system. However, exceptions do exist among Maghrebi saints who achieved significant intellectual accomplishments. A prominent example is Abū Muhammad Ṣāliḥ al-Mājarī, founder of the Safī ribāṭ, who received his education both in the Maghreb and the East. His extended stay in the East was transformative, shaping his intellectual and spiritual path, culminating in sainthood upon his return to the Maghreb.
The East played a pivotal role in shaping al-Mājarī’s religious and intellectual trajectory. It served as a symbol of religiosity, the fulfillment of Islamic duties, and the pursuit of advanced studies, often associated with the ḥajj. The region, home to Islam’s holiest sites, provided an ideal environment for deepening religious commitment. Al-Mājarī not only performed the ḥajj but also resided in the East for two decades, establishing a family tradition linked to these sacred lands through the creation of the rakb al-ḥujjāj (pilgrim caravans) that departed from Safi to the holy sites. The Mājarids further consolidated their legacy by founding over 19 ribāṭs, mosques, and other establishments along the route from Safi to the holy lands, all managed by members of the Mājarid family.
In contrast, the relationship of al-Yuḥānisī with the East followed a different trajectory. As part of the Andalusian model, al-Yuḥānisī benefitted from an early education marked by a rigorous intellectual foundation and a long list of distinguished teachers and disciples. Unlike the Maghrebi system, which was often critiqued for its emphasis on rote memorization, the Andalusian educational system garnered praise from notable scholars such as cad Abū Bakr b. al-`Arabī, Almoravid judge of Seville, and Ibn Khaldūn, who lauded its balanced and comprehensive approach.
In addition to his Andalusian training, al-Yuḥānisī spent 14 years in the East, studying at some of the most prestigious institutions in the region. He exemplifies the archetype of Andalusian Arab-Islamic sainthood, seamlessly blending intellectual rigor with spiritual devotion. One can observe that the stays of Mājarī y al-Yuḥānisī in the East introduced certain similarities in their respective spiritual journeys, despite the fact that the former was one of the most prominent Maghrebi mentors of the latter.
The Maghrebi and Andalusian models are not contradictory but complementary, each defined by its distinct characteristics shaped by the unique historical trajectories of their respective regions. While al-Andalus became politically dependent on the Maghreb from the 11th century onwards, it also faced the persistent challenges of being a frontier society under continuous threat until its final conquest in the 15th century.
6. Educational Institutions (Kuttāb, masjid, ribāṭ, madrasa)
It is very difficult to study teaching centers in the chosen periods without considering the preceding and subsequent periods in order to closely follow the evolution of teaching and the centers where it was given, as well as to determine some of its most outstanding characteristics.
6.1. Kuttāb or Quranic Schools
These schools were known as al-maktab among the Maghrebi, Andalusians, and North Africans, and the person in charge of their management was referred to as the Muktib, mu’allim, or mu’addib (that is, teacher and educator). Biographical dictionaries provide numerous details about these teachers, likely reflecting their significant number, particularly in al-Andalus.
It seems that the Maghrebi people had access to these schools at an early stage, just a few years after Qayrawān was founded (
Ibn Saḥnūn 1972, p. 33). The conquerors felt the necessity to teach their children the Quran and thus constructed modest
katātib, which were also attended by the children of the local population recently converted to Islam (
Ibn Saḥnūn 1972, p. 34). It is particularly noteworthy that the governor was a teacher of the children of Caliph `Abd al-Malik b. Marwān. This fact helps us infer the importance of education in the newly conquered Maghrebi territories. Sources speak of many Quranic schools in the Maghreb throughout its history, whether as annexes to mosques, in the homes of the elite, or indeed in the palaces and courts.
The Andalusians wrote many works about this early phase of education, reflecting a keen interest in this stage of the students’ lives. The oldest document that has reached us is the letter from Ibn Ḥabīb addressed to his son’s teacher (
Sa`īd A`rāb 1972, pp. 57–59). Later, other works were composed, such as
Kitāb al-Mu’allimīn, written by Aḥmad b. `Afīf al-Qurṭubī (d. 347/958) in five volumes. Various Andalusian authors expressed opinions on childhood education, including Ibn Arabi himself and al-Ru`aynī (d. 666/1267). In this regard, the sources reflect the great interest of the Almohads in education and childhood teaching, both in the Maghreb and in al-Andalus. We must not forget, of course, the aforementioned work of the Tunisian author of the 10th century, who composed the
Risāla al-Mufaṣṣala, to which we previously referred, namely al-Qābisī.
Primary education in al-Andalus typically began at the age of five—five or six years in Tunisia (
Ibn Saḥnūn 1972, p. 50;
Al-Wazzān 1983, p. 261)—and was usually received “in mosques, although it soon became apparent that it was advantageous to impart such education in small localities or shops (
al-maṣriyya) apart” (
Bernabé 2007, pp. 12–13). When children reached adolescence, “and according to cycles determined essentially by the progress assessed by the teacher, students could continue their studies into a higher cycle, which usually required them to move to the main mosques of larger cities, or they could abandon their studies and become apprentices in a trade or dedicate themselves to agricultural work” (
Bernabé 2007, p. 14).
Regarding teaching methods in Islam, in general, and in the Islamic West, specifically, several authors have expressed their views. However, the most notable opinions come from Ibn `Arabī (d. 543/1148–1149) (
Ibn Saḥnūn 1972, p. 49), a judge in Seville during the Almoravid period, and Ibn Khaldūn (d. 808/1406) (
Ibn Saḥnūn 1972, pp. 140–46). Praising Eastern education (wa-li-l-qawm fi-l-ta`līm sīra badī`a), Ibn al-`Arabī informs us that a child begins at a Quranic school, then moves on to study calligraphy, followed by arithmetic, Arabic philology, and when he perfects his knowledge in these subjects, he is taken to a teacher (
muqri’) to learn a quarter, half, or an entire chapter (
hizb) of the Quran daily. Once he memorizes the entire Quran, he may either continue his education or discontinue it (
Ibn Saḥnūn 1972, p. 140).
As for the education in al-Andalus during this time, specifically in the 6th century AH/12th century CE (Almoravid period), it is believed that it did not change much during the Almohad period. Ibn Arabi states that the child begins with the Quran, then moves to the study of literature, followed by
al-Muwaṭṭa’, then the
Mudawwana, and finally the contractual documents of Ibn al-Attar, culminating in the study of the
Ahkam of Ibn Sahl. A clear distinction in methods between the East and al-Andalus is evident. Ibn `Arabi expresses considerable concern regarding the Andalusian method, which he finds unsatisfactory, and offers his own approach. He states that the father, guardian, legal tutor, or imam of the child should teach him faith, followed by arithmetic, then poetry, then syntax, then some conjugation; and when the child reaches his second decade, he should study the Quran, followed by the hadiths, which number 2000 hadiths compiled by al-Bukhārī and Muslim, and then the sciences of the Quran and its exegesis (
Ibn Saḥnūn 1972, p. 140).
Ibn Khaldun praises, albeit with reservations, the method proposed by Ibn `Arabī but criticizes the teaching method followed in the Maghreb, which is primarily based on the memorization of the Quran. He critiques that neither
fiqh nor poetry, nor any other subjects are taught. There is praise for the Andalusian method of his time, as he notes that, in addition to the Quran, the Andalusians study poetry, Arabic philology, calligraphy, and Quranic recitations (
Ibn Saḥnūn 1972, pp. 144–45). He also shows a degree of respect and acceptance for the method in Ifrīqiyya, which he claims resembles the Andalusian method, although he insists that the Tunisian approach is characterized by a strong emphasis on the Quran (
Espinar 1999, pp. 190–92;
Ribera y Tarragó 2008, p. 32).
Thus, there is a significant concern for teaching and its methods in the Islamic West from authors belonging to this geographical area. The opinions of both authors are the products of their travels and extended stays in various parts of the Islamic world, especially in the East, whose teaching methods they greatly admire. The teaching method in the Maghreb is not well-regarded, and it appears to have remained unchanged during the medieval period. While it is true that Ibn Khaldūn speaks of education in the Maghreb during the 14th century, I do not believe it varied much from that of earlier periods, including, of course, the Almoravid and Almohad eras. However, in the Maghreb, it is essential to distinguish between the Moroccan and Tunisian methods, as the latter resembles the Andalusian in the inclusion of certain subjects, while also sharing a significant emphasis on the study of the Quran, which is characteristic of the Maghrebi—specifically Moroccan—approach.
6.2. Masjid or Mosque
In addition to being places of worship, mosques also played a significant educational, political, social, economic, and judicial role. In the early days of Islam, “primary and secondary education was conducted in mosques, and from the 9th and 10th centuries, these same centers became the sites for higher education” (
Sánchez 1999, p. 83). According to Ibn Said, the Andalusians had no schools, and all sciences and disciplines were taught in mosques for a salary (
Al-Maqqarī 1978, p. 220). Alongside the mosques, the houses of the ulemas also emerged as the premier centers of education, although some charged for their services. In the biography of Abū Umar Aḥmad b. Sa`īd, Ibn Bashkuwāl informs us that students would come to his house in one of the Andalusian villages, and there were more than 40 students (
Ibn Bahskuwāl 1955, p. 49).
Bernard Lewis notes that “the Islamic mosque was the successor to the Roman forum or the Greek agora, thus becoming one of the major centers of the Muslim political and social entity. These centers also included semi-public libraries for the use of students and teachers” (
Sánchez 1999, pp. 83–84).
We will not provide examples of mosques that served as educational centers, as almost all of them played this role. However, it is worth mentioning that the mosque of Qarawiyyīn, one of the oldest mosques in the Islamic world, built in the 3rd century AH/9th century CE, has been and continues to be one of the most important educational centers in the Maghreb throughout its history. This mosque has been the place of study for some of the most prominent figures in the fields of religious, philosophical, and legal knowledge in the Islamic West, including Ibn Khaldūn, al-Idrīsī, Ibn al-Khaṭīb, Ibn `Arabī, and Ḥasan al-Wazzān, among many others (
Rodríguez Mediano 1995, p. 32;
Picard 1918;
Berque 1949).
6.3. Ribāṭs
The question concerning the ribāṭ and its historical evolution has been the subject of a previous study of mine (
El Hour 2025). Having said that, I would like to point out this study only refers to the ribāṭ as an educational center in the studied periods, especially in the Maghreb. During these periods, the ribāṭ had neither defensive nor military functions, but rather social, economic and educational functions linked to the ideologies of the Almoravid, Almohad, and Marinid states. The military function was typical of earlier times, especially between the seventh and tenth centuries, but it is not the subject of this study.
One believes that we cannot discuss the
ribāṭ without referring to the excellent work of Fracisco Franco Sánchez (
Franco-Sánchez and de Epalza 2004), dedicated precisely to this topic. However, this does not diminish the importance of other pioneering works on the same subject, such as those by Christophe
Picard (
2001), María Jesús
Rubiera (
1987), Georges
Marçais (
1957), Míkel de
Epalza (
1983), Rafael
Azuar (
1985), and Leopoldo Torres
Balbás (
1948), among others. M. Marín, for example, clearly outlines the functions of the
ribāṭ in the Islamic West. The first known
ribāṭ, where these pious ascetics gathered, dates back to the 2nd century AH/8th century CE and was founded in the city of `Abadān on the coast of the Arabian Gulf. On the North African coast,
ribāṭs began to be constructed at a very early stage, the first of which, in Monastir, was established in the year 180 AH/796 CE (
Franco-Sánchez and de Epalza 2004). Francisco Franco, in addition to providing an excellent critical study of the most significant works on
ribāṭs, examines the
ribāṭ in al-Andalus and emphasizes its military and religious functions, as well as its location within the Andalusian territory.
Other works are archeological in nature, but this does not diminish their significance; rather, the data they provide help us determine the geographical location of ribāṭs and thereby establish the boundaries of the Muslim empire or state, as well as the distribution of ribāṭs along these borders.
One believes that the history of the Maghreb and its civilization cannot be understood without first comprehending the role that religious education played. Thanks to this education, among other factors, the Maghreb was Islamized, and it preserved its religious identity throughout the medieval period. The religious history of the Maghreb is filled with examples that confirm this role. That said, I must clarify that my intention is not to analyze the ribāṭ and its historical evolution, but rather to offer some insights regarding its role as an educational institution.
From their emergence in the 2nd century AH/8th century CE until the 6th century AH/12th century CE,
ribāṭs played a pivotal role in religious education and in consolidating Islamic principles in North Africa. They were also responsible for
jihād and the fight against innovations and other non-Sunni schools (the “deviant” schools). Throughout the Islamic West, the role of the
ribaṭs extended beyond
jihād (
Franco-Sánchez 2004, pp. 104–6), as they served as crucial centers for the propagation of Islam and religious education, where teachers gathered to solidify Islamic principles, teach
fiqh, and provide Sufi education or advice to the
murīdūn. It is known that the teaching method of the
ribāṭ differs from that of the mosques or schools that emerged after the 12th century, as it is a practical and functional pedagogical method aimed at influencing behavior, morality, and ethics rather than propagating theoretical teachings. The most important
ribāṭs were those of Ibn Yāsīn during the Almoravid period and Ibn Tūmart during the Almohad period. Education at these
ribāṭs was limited to the pillars of Islam, prayer, almsgiving, distinguishing between the lawful and the unlawful, and learning the basic rules for correct prayer, along with listening to sermons and advice in the Berber language (Yūsuf b. Tāshufīn did not know Arabic, despite being one of the first disciples of this
ribāṭ). It is evident that the education at this
ribāṭ had a Sufi character. Ibn Yāsīn was more of a teacher than a Mālikī jurist. After the number of disciples increased, he called upon them to fight against the Bargawāṭa (
El Hour 2025). In the early 6th century AH/12th century CE, Ibn Tūmart established another
ribāṭ in Harga, known for its
ribāṭ located in Iklīz, very close to the
ribāṭ of Massa and the
ribāṭ of Wakkāk (
Askān 2006, p. 155). Ibn Tūmart built his
ribāṭ, Wanṣrī, in the Iklīz mountains, in a rugged and secure area. This
ribaṭ attracted the
maṣāmida from all over. The main activities of this
ribāṭ were education and teaching,
al-amr bi-l-ma‘rūf (commanding good), and propaganda, as it sent its followers to all the
maṣmūda tribes (
Askān 2006, p. 155).
One of the oldest and most prominent
ribaṭs in medieval Maghreb is the
ribāṭ of Tit. This
ribāṭ was founded in the 11th century and played a significant role in the struggle against the Bargawāṭa. It was the destination for many figures from the Maghreb’s sanctity world for the study of various subjects and served as the center for preaching in the Berber language (
wa‘ẓ) and teaching the basic principles of Islam. From the examples we have, it can be inferred that teaching in these
ribāṭs was conducted in the Berber language (
El Hour 2019). Ibn Tasufin himself studied at the
ribāṭ of Ibn Yāsīn, and Ibn Tūmart founded the
ribāṭ of Wanṣrī, where he served as a teacher, among other cases (
Askān 2006, p. 148). Thus, it is clear that the role of the
ribāṭ, in addition to
jihad, was devotion; it was an educational center, but I do not believe it reached the importance of the mosque.
6.4. Madrasas or Schools
According to most researchers, the school, in the “modern” sense of the word—that is, a building serving a function distinct from that of a mosque or a
ribāṭ—emerged in the East in the 5th century AH/11th century CE; in contrast, it did not appear in the Maghreb until the 13th century. Some sources date its emergence during the Almoravid period, specifically in the 11th century (during the time of Yūsuf b. Tāshufīn, who established a
ḥubus for the school of al-Sābirīn in Fez); others locate it in the 12th century, during the time of Ya`qūb al-Manṣūr, who established a
ḥubus for a school and the zāwiya of Abū l-`Abbās al-Sabtī in Marrakech and constructed a school north of the grand mosque of Salé, etc (
Askān 2006, p.59). However, these references find no support among the contemporary authors of these events, who assert that schools did not appear in the Maghreb until the 7th century AH/13th century CE.
By the end of the 12th century, specifically in 580 AH/1188 CE, Ibn Jubayr recommended that his impoverished students, who could not afford their studies, travel to the East to study in the schools there, while authors like Ibn al-Khatīb date the emergence of the school in the early 8th century AH/14th century CE, as he refers to it as a novel development (
Askān 2006, p. 59).
It seems that the school in the Maghreb appeared two centuries later in the East, specifically in 635 AH/1238 CE in Ceuta, established by a scholar of the city, named Abū l-Ḥasan `Alī al-Ghāfiqī al-Shārī (d. 649/1252), near the Palace Gate (
Bāb al-Qaṣr), one of the city gates, and designated one of his properties, a library, for its maintenance, following the example of the Eastern schools (
Al-Marrākushī 1984, p. 197). Al-Sabtī (8th century AH/14th century CE) (
Al-Sabtī 1983) confirms that this library was the first target of a
waqf to cover the needs of the students. Ḥ. Askān clearly states, and I share his opinion, that the establishment of this school was not merely an imitation of the school in the East but the product of factors tied to the founder himself. Al-Shārī had a strong attachment to the Sunni school and was opposed to all innovations. His commitment to defending the Sunni school drove him to create this school to use it as a center for combating other schools, ideologies, and innovations, similar to what occurred in the East.
According to the sources, this madrasa exclusively taught
hadith, unlike the Marinid schools, where classes in
fiqh were also held. Al-Sari continued to teach
hadith until he was expelled by the city’s governor, al-Yuḥānisī, in 641 AH/1244 CE, out of fear that he would gain control of the city; during his exile, he continued teaching
hadith until he died in 649 AH/1252 CE. According to al-Sabtī (
Al-Sabtī 1983, p. 21), a woman who was a traditionist and expert in the transmission of
hadith succeeded him in teaching
hadith at the school.
Georges Makdisi (
Makdisi 1973, p. 155) dates the emergence of the madrasa in Murcia in the 11th century, based on the testimony of Ibn Farḥūn in his biography of Ibn Sukkara (d. 1060). Ibn Farḥūn uses the term madrasa, but I do not believe he was referring to the madrasa with the profile of the Niẓāmiyya or that of Ceuta. When discussing Ibn Sukkara, Ibn Bashkuwāl (
Ibn Bahskuwāl 1955, p. 331), who lived in the 12th century and was therefore closer to the time of his subject, notes that upon his return to al-Andalus, he settled in Murcia and taught
hadith in his
Ǧāmi`, meaning in his grand mosque, and does not mention any madrasa. There is no doubt that Ibn Farḥūn, being a contemporary of a golden age in the evolution of madrasas, must have used the terms of his time. Various authors, including Ibn al-Khatib, discuss and locate the madrasa in the East, even during their time (
`Affāqī 2015, p. 8).
In any case, education became institutionalized in the Maghreb during the Marinid period, and this was also the case in al-Andalus shortly thereafter, to the extent that “in the 14th century, free education once again had its most significant manifestation according to the code of Yūsuf I” (
Espinar 1999, p. 183). Education experienced periods of great flourishing, and the state financed studies and developed support for students, especially during the time of Yusuf I. Many testimonies indicate the involvement of governments in education starting from the 13th century, both in the Maghreb and in al-Andalus. Some Marinid sultans, like the Naṣrids, were concerned with the education of the poor. The author of
Rawḍ al-Qirṭās states that Abu Yūsuf Ya`qūb “constructed schools and provided stipends for students to read the Quran and learn the sciences, assigning them a monthly stipend out of his desire for God to reward him” (
Espinar 1999, p. 189).
All indications suggest that education and teaching with the sponsorship and funding of the ruling dynasties in the Islamic West underwent significant changes with the arrival of the Marinids (
Sarr and Mattei 2009, pp. 56–57), and these changes likely exerted a considerable influence on al-Andalus (
Ribera y Tarragó 2008, p. 18), resulting in the emergence of the first schools as follows: the one in Malaga, initiated privately by Abū `Abd Allah al-Sāḥilī in 740 AH/1339 CE (
Rubiera Mata 1970, p. 223), and the Yūsufiyya founded by Sultan Yusuf I in 750 AH/1349 CE (
`Affāqī 2015, p. 11;
Bernabé 2007, pp. 19–20;
Rubiera Mata 1970, p. 223), just ten years after the Malaga school.
7. Conclusions
The excerpts presented highlight some aspects that contribute to clarifying the nature of the educational system in the Islamic West during the Almohad, Marinid, and Nasrid periods. We have seen how education was a private initiative borne by the parents, meaning that the parents were responsible for hiring and paying the salaries of their children’s teachers. Women from the palace and the Almohad elite received their education either in the palace or at home, and as one would expect, they had access to the best teachers, coming from various regions of the Islamic West. The poor, on the other hand, studied either in Quranic schools, in the ribāṭ, or in mosques, and later, particularly from the Marinid period onwards, in the schools that were institutionalized throughout the Islamic West.
It is impossible to speak of education in the medieval Islamic West without considering the role played by educational institutions such as Koranic schools, mosques, ribāts, and later, madrasas and zāwiyas. The hagiographic literature is of paramount importance for the study of education in Islam, especially in its western zone, not only because of the volume of sources belonging to the hagiographic genre, but also because it helps us to define the existing educational models in this zone, as we have seen with the cases of the Maghreb and al-Andalus. The Berber element marks not only the differences between the Maghrebi and the Andalusian educational systems, but also the educational sanctity models of these two areas, conclusions that have been reached thanks to the data provided by the hagiographic sources (
El Hour 2019).