Liber XVII · Islam · Chapter III: Islamic Occult Sciences
Al-Buni and the Shams al-Ma'arif: The Islamic Science of Letters
Al-Buni and the Shams al-Ma'arif explained: the Sufi lettrist of Cairo, the science of letters and divine names, magic squares and a famous, feared book.
Ahmad ibn 'Ali al-Buni (died c. 1225) was a North African Sufi, active in Egypt, whose writings became the classic authority for ʿilm al-ḥurūf, the Islamic "science of letters". He taught that the letters of the Arabic alphabet and the divine names of God carry hidden powers that can be contemplated and used in prayers, amulets and magic squares. The Shams al-maʿārif al-kubrā ("The Great Sun of Knowledge"), the book most associated with his name, became the most famous and most feared manual of Islamic occultism, though modern research shows that its popular form is largely a later compilation.
Who Was Ahmad al-Buni?§
Very little is known about al-Buni's life. His name indicates an origin in Buna, the coastal town in eastern Algeria now called Annaba, and his writings show that he lived and taught in Cairo in the early thirteenth century, during the Ayyubid period. He was a Sufi, connected through his teachers with the mystical circles of the Maghrib, and he presented his knowledge as part of the spiritual path rather than as a technical craft. The traditional date of his death, 622 AH (1225 CE), is accepted by most scholars but not certain.
Al-Buni was a near contemporary of Ibn 'Arabi, who also wrote at length on the mysteries of the letters. Both drew on a long tradition of speculation going back to early Shi'i and Sufi circles and to the Jabirian alchemical corpus, which had already assigned numerical and cosmic values to letters. The wider context of these sciences is set out in Islamic Occult Sciences: A History.
The Corpus and the Problem of the Shams al-Ma'arif§
Scholars now distinguish between al-Buni's own works and the much larger body of writing later attributed to him. Among the works considered authentic are Laṭāʾif al-ishārāt ("Subtleties of the Allusions"), on the secrets of the letters, and ʿIlm al-hudā wa-asrār al-ihtidāʾ, a treatise on the Most Beautiful Names of God. An early, shorter work entitled Shams al-maʿārif also seems to go back to him.

The famous Shams al-maʿārif al-kubrā, printed in Cairo and elsewhere since the nineteenth century and still sold in many editions, is a different matter. Research by Noah Gardiner and others on the manuscripts has shown that this "great" version was assembled long after al-Buni's death, probably in the Ottoman period around the seventeenth century, combining genuine Bunian material with texts on astrology, jinn and talismans from other sources. Its fame as a dangerous book of sorcery belongs largely to this later compilation.
In the fourteenth and fifteenth centuries al-Buni's works circulated among learned Sufis and scholars in Mamluk Cairo and Damascus, often taught with formal certificates of transmission. The Ottoman lettrist 'Abd al-Raḥmān al-Bisṭāmī (d. 1454) did much to spread them, and the science of letters became fashionable among intellectuals and at court in the Ottoman, Safavid and Mughal empires.
The Science of Letters and the Divine Names§
The core of al-Buni's teaching is cosmological and devotional. God created the world through His word, and the Arabic letters, the building blocks of the Qur'an, are therefore traces of the creative act. Each of the twenty-eight letters was associated with one of the four elements, with one of the twenty-eight lunar mansions, with a numerical value in the abjad system and with qualities such as heat or dryness. The mysterious isolated letters that open twenty-nine surahs of the Qur'an, such as Alif Lām Mīm, were treated as especially charged with meaning.
The ninety-nine Most Beautiful Names of God occupy the centre of this system. For al-Buni, each name expresses an aspect of divine activity, and its repeated recitation (dhikr) in the right spiritual state draws the seeker towards that quality. Contemplation of the names, fasting, retreat and purity of intention are presented as preconditions; without them, he insists, the knowledge is useless or harmful. In this respect the science of letters resembles the Jewish speculation on divine names described in The 72 Names of God, and medieval writers on both sides noticed the parallels.
Magic Squares, Seals and Talismans§
The aspect of the Bunian tradition best known to outsiders is its use of the wafq, a square grid of numbers or letters whose rows, columns and diagonals add up to the same total. Such squares had been studied by Muslim mathematicians before al-Buni; his works give them a religious and cosmological meaning, linking particular squares to planets, divine names and verses of the Qur'an. The simplest, the three-by-three square, became known in the Islamic world by the word budūḥ, formed from the letters of its corner numbers, and was written on amulets, doors and letters for protection. The European planetary squares that later appear in Agrippa have a related history, traced in Magic Squares, Kameas and Planetary Seals.

Bunian and pseudo-Bunian texts also describe seals (khawātim), among them a group of seven signs connected with the Seal of Solomon, and they give names of angels and of jinn associated with the days of the week. Talismans based on this material were written on paper, engraved on metal and stone, and, in the Ottoman and Mughal worlds, painted on shirts covered in Qur'anic verses, divine names and squares, which survive in museum collections. Such objects belong to the broader history told in Amulets and Talismans: A Complete Guide. Their makers understood them as works of prayer and protection; like other forms of traditional magic, they are part of religious and cultural history and no substitute for medical, legal or financial help.
Lettrism, Sufism and Islamic Criticism§
Lettrism was never a fringe hobby. In the fifteenth century the science of letters was taken up by philosophers, historians and political advisers, and it influenced the messianic Ḥurūfī movement founded by Faḍlallāh Astarābādī (executed 1394), who taught that God reveals himself in the letters and in the human face. In later centuries it fed into court astrology, divination and the education of rulers, an episode studied by historians such as Matthew Melvin-Koushki.
Criticism was equally old. The historian Ibn Khaldun, in his Muqaddima (1377), devoted a chapter to the science of letters, naming al-Buni and Ibn 'Arabi among its masters, and concluded that its practical use was a form of sorcery that drew on the soul's powers rather than on God's grace. Ibn Taymiyya and many later jurists condemned it as forbidden magic, and modern Salafi movements regard the Shams al-maʿārif as a manual of unbelief. Defenders, in turn, distinguished between permitted protective writing based on the Qur'an and the names of God, and forbidden sorcery involving jinn or harm, a distinction also discussed in Jinn and the Unseen in Islam.
Influence in the Muslim World and Beyond§
Through manuscripts, printed editions and oral teaching, the Bunian tradition shaped the practice of amulet-makers and religious specialists from Morocco and West Africa to the Swahili coast, Turkey, Iran, South Asia and Southeast Asia. In West Africa, Muslim scholars produced talismans and divinatory charts drawing on the same repertoire, alongside the sand divination described in Geomancy: A Complete Guide. Today the science of letters remains both a living craft and a subject of serious scholarship, studied through museum objects, manuscripts and the history of Islamic intellectual life.
Frequently asked questions§
What is the Shams al-Ma'arif?§
Shams al-maʿārif al-kubrā, "The Great Sun of Knowledge", is a large Arabic compendium on the science of letters, divine names, magic squares and talismans attributed to al-Buni. Modern research shows that its printed form is a later compilation that grew around his genuine works.
Is the science of letters allowed in Islam?§
Opinions differ. Many jurists condemn lettrist magic as sorcery, while others permit protective writing based on the Qur'an and the divine names. Contemplating the meanings of the names, as distinct from using them for worldly ends, is widely accepted in Sufism.
What is a wafq?§
A wafq is a magic square in which the numbers of every row, column and diagonal add up to the same total. In Islamic lettrism such squares were linked with planets, divine names and Qur'anic verses and used on amulets.
Sources and further reading§
- The Muqaddimah: An Introduction to History — Ibn Khaldun, trans. Franz Rosenthal, 1958
- Magic and Divination in Early Islam — Emilie Savage-Smith (ed.), 2004
- Islamicate Occult Sciences in Theory and Practice — Liana Saif, Francesca Leoni, Matthew Melvin-Koushki and Farouk Yahya (eds.), 2021
- Power and Protection: Islamic Art and the Supernatural — Francesca Leoni, 2016
- Arabic and Persian Seals and Amulets in the British Museum — Venetia Porter, 2011
- The Arabic Influences on Early Modern Occult Philosophy — Liana Saif, 2015