The following is another short excerpt that I have translated from the Buyūtāt Fās al-Kubrā by the fourteenth-century Andalusī historian Ismā‘īl ibn al-Aḥmar (d. 1407). I found this particular passage to be interesting because it reflects the manner in which the legend of the relationship between the Ash‘arite theologian and mystic Abū Ḥāmid al-Ghazālī (d. 1111) and the founder of the Almohad movement, Muḥammad b. Tūmart (d. 1130) is developed. Ibn al-Aḥmar’s narrative, written in the fourteenth century, shows that nearly three centuries after the rise of the Almohads it continued to have resonance in the Islamic West. Two elements that I found particularly interesting was the link that is drawn between the Almoravids burning* of al-Ghazālī’s works and the latter’s invocation against them on one hand, and the conscious decision of al-Ghazālī, who probably never met Ibn Tūmart, to use his overzealous student as his agent in bringing about the destruction of the Almoravid polity. This is especially interesting in light of other historical accounts which suggest that it was none other than al-Ghazālī (and his student Abū Bakr al-Turtūshī) who played an important role in legitimizing the Almoravid state in the first place. Moreover, it was quite interesting to see such a prominent role given to the occult sciences in this text, with emphasis being placed on Ibn Tūmart’s receiving special instruction in this body of knowledge by al-Ghazālī.
*(For an important article on the politics of book-burning in al-Andalus, see http://www.tandfonline.com/doi/abs/10.1080/17546559.2014.925134)
(Coin of the Almohad caliph Abu Ya’qub Yusuf [r. 1163-1184])
Some people have claimed that reason for the fall of the kingdom of the Lamtūna (i.e. the Almoravids) was the famous invocation that Abū Ḥamid al-Ghazālī had made against them. When the latter wrote his book entitled the Iḥyā’ [‘Ulūm al-Dīn] and had it sent to the Great Mosque of Cordoba, the eminent jurists of Cordoba debated and disputed about it, especially regarding the inclusion within the work of clearly fabricated and baseless hadith. They concluded that the work was a source of misguidance for the Muslims and that it would be best to burn it. Since the jurists and religious scholars had agreed on this course of action, the work was burned in Cordoba. As for Ibn Ḥamdīn, the chief judge (qāḍī) of Cordoba, he went as far as to declare the work’s author (i.e. al-Ghazālī) to be a disbeliever. The religious scholars of Cordoba wrote to [the Almoravid emir] ‘Alī b. Yūsuf [r. 1106–1143] demanding that he order that the work be burned throughout al-Andalus and North Africa. After receiving this letter, which affirmed that these religious scholars had all agreed that al-Ghazālī’s Iḥyā’ should be burned, he ordered that the work should indeed be burned across all the lands of al-Andalus and North Africa.
(Courtyard of the Great Mosque of Cordoba, where al-Ghazālī’s works were burned)
Shortly thereafter, word of these events reached Abū Ḥāmid al-Ghazālī in Baghdad. [In order to confirm this news], al-Ghazālī asked a Cordoban, who was visiting Baghdad at the time, about the veracity of the news that his books had been burned in Cordoba, so this man told him about the opposition to his book, about those who declared him to be a disbeliever, and about the shredding and burning of his book. Upon hearing this, al-Ghazāī raised his hands in supplication and said: “O Lord, tear apart their kingdom as recompense for their tearing apart my book; eradicate their dynasty as recompense for their burning of it; and grant possession of Cordoba to the disbelievers as recompense for their chief judge declaring me to be an unbeliever.” At that moment, the Mahdī [Ibn Tūmart], who was present at Abū Ḥamid al-Ghazālī’s class, said: “Will this (i.e., the fall of the Almoravid state) take place by my hand?” Al-Ghazālī affirmed that this would indeed be the case. As a result of this supplication, the Almohads have claimed that the conquest of Cordoba from the Muslims and the domination of the Christians over the city was a direct result of al-Ghazālī’s invocation against them. The Christian conquest of Cordoba occurred in 634 A.H. [1236 A.D.].
(Manuscript of Vol. IV of al-Ghazālī’s Iḥyā’ ‘Ulūm al-Dīn, probably from Syria or Egypt, dated 631 AH/1233-4 AD. For more on this manuscript: http://www.sothebys.com/es/auctions/ecatalogue/2011/arts-of-the-islamic-world-l11220/lot.205.html)
Afterwards, al-Ghazālī took the Mahdī under his wing and taught him the various sciences, including timekeeping (al-tawqīṭ wa al-ta‘dīl), astronomy (al-hay’ah), the active properties of herbs (khūwāṣ al-a‘shāb), divine governance (al-tadbīr ), metallurgy (al-ma‘ādin), the mathematical and geometric sciences (al-ashkāl), geomancy (‘ilm al-khaṭṭ), medicine (al-ṭibb), philosophy (al-ḥikmah), magic squares and talismans (ṣinā‘ah al-jadwal wa al-ṭalāsim), lettrism (sir al-ḥurūf), clairvoyance (‘ilm al-hidthān) and the various magical sciences (‘ulūm al-siḥr), making him an expert in each of these. He then ordered him to return to North Africa.
(Unidentified late medieval manuscript on magic squares, an important occult science in the pre-modern Islamic world)
When [Ibn Tūmart] returned to North Africa he sought to rectify reprehensible practices, which led Ibn Nāṣir [one of the local authorities] to seek his imprisonment, but he fled to Bijāyah. News of Ibn Tūmart eventually reached Ibn Ḥammād, ‘Alī b. Yūsuf’s governor in Ifrīqīyah [modern-day Tunisia], who attempted to imprison him, but once again he managed to elude the authorities and reached Malālah, where he met ‘Abd al-Mu’min, with whom he was quite impressed. He then fled from Wansharīsh to Fez, and from there to Marrakech. When news of this reached Alī b. Yūsuf, he gathered together the religious scholars to engage him (i.e. Ibn Tūmart) in theological disputation. These religious scholars asserted that Ibn Tūmart should be put to death, but some of the Almoravid emir’s ministers urged him not to do so. In Ramadan 515 A.H. [November 1121 A.D.], the Mahdī fled to his homeland in the Hargha mountains in the region of Sūs. He gathered the Berber tribes around him and asserted that he was the Rightly-Guided Savior (al-mahdī) about whom the Prophet of God (may the peace and blessings of God be upon him) said: “Verily, he shall fill this world with justice just as it has been filled with injustice.” He then called them to pledge allegiance to him under a carob tree, just as the Companions had done with the Prophet of God (may the peace and blessings of God be upon him). Most of those who pledged their allegiance to him were from the tribes of the Sūs, Hargha and Tinmāl regions, such as Ḥintātah, Gedmīwah, Haskūrah and Sanhājah. He then ordered them to prepare for war.
[Ismā‘īl ibn al-Aḥmar, Buyūtāt Fās al-Kubrā (Rabat, 1972), pp. 33–34]