Sacred Texts Β· Islamic Occultism Β· Grimoire Β· Contested

The Shams al-Ma'arif

"The Sun of Knowledge" β€” the single most influential, most reproduced and most controversial grimoire in the history of Islamic occultism. Magic squares, the science of letters, and the hidden power of the names of God, compiled by a 13th-century Sufi mystic whose reputation was never quite the same again.

The Shams al-Ma'arif occupies a genuinely contested place within Islamic intellectual history. It is not a fringe text β€” its author was a respected Sufi scholar, and the work draws on centuries of legitimate Islamic scholarship on the divine names and the mystical properties of the Arabic alphabet. At the same time, large portions of the text circulating today were added by later compilers, and its practical instructions for spirit-summoning have made it deeply controversial within Islamic scholarship itself, where it is frequently condemned as sihr (forbidden sorcery) rather than accepted 'ilm (legitimate knowledge).

What Is the Shams al-Ma'arif?

The Shams al-Ma'arif al-Kubra β€” "The Greater Sun of Knowledge" β€” is a sprawling compendium of Islamic esoteric science attributed to Ahmad ibn Ali al-Buni, a Sufi mystic who lived and died in the early 13th century (d. c.1225 CE) in what is now Algeria and Egypt. It is, by volume, one of the largest single works of occult literature to survive from the medieval Islamic world, and unlike many grimoires that circulated in secrecy, it became β€” and remains β€” genuinely widespread across the Muslim-majority world.

The text is organised as a vast reference manual rather than a linear treatise. It moves between systematic discussions of the mystical properties of individual Arabic letters, tables of numerical correspondences, the ninety-nine names of God and their invocatory uses, detailed magic squares (awfaq) for specific purposes, and instructions concerning jinn, angels and other unseen entities. Two broad versions circulate today β€” a shorter al-Sughra ("Lesser") and the much longer al-Kubra ("Greater") β€” and scholars agree that significant material was added to both after al-Buni's death, sometimes centuries later.

What makes the work distinct from Western grimoires of a similar function is its foundation in specifically Islamic theology. Its power is not drawn from pagan deities or generic spirits but from the names and attributes of God as understood in Islamic tradition, filtered through the Sufi conviction that the Arabic language itself β€” as the language of divine revelation β€” carries metaphysical weight down to the level of the individual letter.

This is also precisely why the work is so divisive. Ilm al-huruf, the science of letters, has a long and respected pedigree within Sufism as a contemplative discipline. But the Shams al-Ma'arif pushes that discipline toward operative magic β€” using the names of God to compel outcomes in the world β€” which many Islamic scholars regard as a serious theological transgression rather than mysticism.

The Five Pillars of the Text

Ilm al-Huruf
The Science of Letters
The foundational discipline underlying the entire text: each of the 28 letters of the Arabic alphabet is assigned a numerical value, an elemental quality, a planetary ruler and a hidden metaphysical significance, following the ancient abjad numeral system. Combinations of letters are believed to encode and release specific powers.
Al-Wafq
Magic Squares
Numerical grids in which every row, column and diagonal sums to the same value β€” inherited from a much older mathematical tradition and repurposed as talismanic devices. Each square is tied to a planet, a divine name or a specific intention, and is written on paper, cloth or metal for protection, healing or influence.
Asma al-Husna
The Ninety-Nine Names
The beautiful names of God, each carrying a distinct attribute β€” the Merciful, the Avenger, the Opener, the Concealer. Orthodox Islamic practice uses these names in prayer and remembrance (dhikr); the Shams al-Ma'arif assigns each one a numerical value, a preferred time, and a specific operative use β€” the point at which contemplative practice becomes ritual technology.
Da'wat al-Ruhaniyya
Spirits & Jinn
Detailed instructions for communicating with jinn β€” beings explicitly acknowledged in the Qur'an as a distinct order of creation made of "smokeless fire." The text catalogues their names, temperaments, the conditions under which they may be approached, and the risks of the practice, drawing on a folk-Islamic tradition far older than al-Buni himself.
Al-Tilasmat
Talismans & Amulets
Physical objects β€” inscribed metal discs, written papers, knotted cords β€” through which the powers described elsewhere in the text are made portable and applied to daily concerns: protection from the evil eye, healing, safe travel, reconciliation, and financial success.

Ahmad al-Buni β€” The Author

Very little is known about Ahmad ibn Ali al-Buni with certainty. He is generally believed to have been born in BΓ΄ne (modern Annaba, Algeria) and to have spent much of his life in Ayyubid Egypt, where he died sometime around 1225 CE. He is described in biographical sources as a Sufi of considerable standing, connected to the broader current of Islamic mysticism that also produced towering figures such as Ibn Arabi, with whom al-Buni's period of activity overlaps.

Al-Buni was a genuine scholar of the esoteric sciences as they existed within his intellectual world β€” not a marginal figure operating outside Islamic learning, but someone working within a recognised, if controversial, current of it. He is credited with several other works on letter mysticism and the divine names beyond the Shams al-Ma'arif, though establishing which surviving texts are authentically his and which were later attributed to his name β€” a common practice used to lend authority to newer compositions β€” remains a genuine scholarly difficulty.

This attribution problem is central to understanding the text as it exists today. The Shams al-Ma'arif that circulates now, particularly the "Greater" version, is substantially larger than what al-Buni himself is likely to have written, having absorbed material from later Ottoman-era compilers over several centuries. The book functions less as the fixed work of a single author and more as a living tradition that continued to accumulate content under his name long after his death β€” much like the Key of Solomon in the European grimoire tradition.

A History of the Text

Early 13th century
Composition
Ahmad al-Buni composes the core material that becomes the Shams al-Ma'arif, drawing on earlier Sufi letter-mysticism, Neoplatonic number theory transmitted through Arabic sources, and the folk-magical tradition of talismans and amulets already widespread across the Islamic world.
13th–16th century
Manuscript Expansion
The text is copied, expanded and reorganised by successive scribes across North Africa and the Ottoman lands. The "Greater" version grows substantially beyond its original core, absorbing new material on jinn, additional magic squares and expanded commentary.
Ottoman-Era Circulation
16th–19th century
The Shams al-Ma'arif becomes one of the most widely copied esoteric manuscripts in the Ottoman world, valued by scholars, healers and practitioners of folk religion alike, while simultaneously being condemned by mainstream jurists as a text of forbidden sorcery.
19th–20th century
Colonial-Era Study
European orientalist scholars encounter the text during the colonial period and produce the first Western academic descriptions of it, though full critical translations remain rare even today given the text's length and the instability of its manuscript tradition.
20th century
Restriction & Controversy
The book is banned or restricted in several Muslim-majority countries, where religious authorities classify its contents as sihr (forbidden magic) rather than legitimate Islamic knowledge β€” a controversy that continues into the present.
21st century
Digital Circulation
Despite official restrictions, the text circulates freely online in Arabic and in partial translations, discussed in both academic contexts examining Islamic esoteric history and popular contexts of varying reliability.

The Legacy

The Shams al-Ma'arif's influence extends far beyond its immediate readership. Its systematisation of letter-number correspondence shaped how later generations across the Islamic world understood the relationship between language and the unseen β€” an idea with echoes in the Hebrew tradition of gematria and Kabbalah, developing in parallel intellectual currents across the medieval Mediterranean.

It also occupies a genuinely important place in the wider story told across this reference: the Silk Road's transmission of magical and astrological ideas did not move in one direction only. Babylonian celestial omen-craft fed into Hellenistic astrology, which fed into Arabic occult science, which produced texts like the Shams al-Ma'arif and the Picatrix β€” both of which later shaped European Renaissance magic through translation and contact. The chain from Marduk's Babylon to Ficino's Florence runs directly through texts like this one.

At the same time, the book's reputation remains genuinely divided within the tradition that produced it β€” read by some as a legitimate if dangerous branch of Islamic esoteric science, and condemned by others as incompatible with orthodox theology altogether. That tension is not a flaw in the historical record; it is the honest shape of how the text has always been received.

Essential Reading
Noah Gardiner's academic work on al-Buni and the manuscript tradition of the Shams al-Ma'arif is the most reliable scholarly entry point. Matthew Melvin-Koushki's research on Islamicate occultism provides broader context. Full reliable English translations remain limited β€” most popular English editions should be approached with caution regarding accuracy.
The Honest History
The text sold today as "the Shams al-Ma'arif" is a composite that grew for centuries after al-Buni's death; there is no single authoritative original. Much of what circulates in modern print and online is drawn from later, less rigorous compilations, and its reception within Islamic scholarship remains genuinely contested rather than settled.
Connections
The Shams al-Ma'arif connects to the Picatrix (a sibling text in Arabic occult science), Sufism (the mystical current al-Buni belonged to), Kabbalah (a parallel letter-mysticism tradition), the Key of Solomon (the equivalent grimoire tradition in medieval Europe) and the broader Silk Road transmission of astrological and magical knowledge.