Shams al-Ma'arif al-Kubra, a manuscript copy, beginning of 17th century

Ahmad ibn ‘Ali al-Buni (Arabic: أحمد البوني‎), his complete name is Sharaf al-Din or Shihab al-Din Ahmad ibn Ali ibn Yusuf al-Buni al-Maliki al-ifriqi (born in Bône (Annaba), Algeria died 1225) was a well known Sufi and writer on the esoteric value of letters and topics relating to mathematics, sihr (sorcery) and spirituality, but very little is known about him. Al-Buni lived in Egypt and learned from many eminent Sufi masters of his time.[1]

A contemporary of Ibn Arabi,[2] he is best known for writing one of the most important books of his era; the Shams al-Ma'arif, a book that is still regarded as the foremost occult text on talismans and divination. It was to be banned soon after as heretical by followers of the Islamic orthodoxy.

Table of associations between letters, the mansions of the moon, the constellations of the standard zodiac, and the seasons by Al-Buni

Instead of sihr (Sorcery), this kind of magic was called Ilm al-Hikmah (Knowledge of the Wisdom), Ilm al-simiyah (Study of the Divine Names) and Ruhaniyat (Spirituality). Most of the so-called mujarrabât ("time-tested methods") books on sorcery in the Muslim world are simplified excerpts from the Shams al-ma`ârif.[3] The book remains the seminal work on Theurgy and esoteric arts to this day.

In c. 1200, Ahmad al-Buni showed how to construct magic squares using a simple bordering technique, but he may not have discovered the method himself. Al-Buni wrote about Latin squares and constructed, for example, 4 x 4 Latin squares using letters from one of the 99 names of Allah. His works on traditional healing remains a point of reference among Yoruba Muslim healers in Nigeria and other areas of the Muslim world.[4]

It is stated in his work Manba’ Usul al-Hikmah (Source of the Essentials of Wisdom) that he acquired his knowledge of the esoteric properties of the letters from his personal teacher Abu Abdillah Shams al-Din al-Asfahâni. He in turn received it from Jalal al-Din Abdullah al-Bistami, who in turn received it from Shaykh al-Sarajani, who received it from Qasim al-Sarajani, who received it from Abdullah al-Babani, who received it from Asîl al-Din al-Shirazi, who received it from Abu al-Najîb al-Sahruwardi, who received it from, Mohammad ibn Mohammad Al-Ghazali al-Tusi, who received it from Ahmad al-Aswad, who received it from Hamad al-Dînuri, who received it from the master al-Junayd al-Baghdadi, who received it from Sari al-Din al-Saqati, who received it from Ma’ruf al-Karkhi, who received it from Dawûd al-Jili, who received it from Habîb al-A’ajami, who received it from Imam Hasan al-Basri.

Al-Buni states in the same work that he acquired his knowledge of magical squares from Sirâj al-Dîn al-Hanafi, who acquired it from Shihab al-Dîn al-Muqaddasi, who acquired it from Shams al-Dîn al-Farisi, who acquired it from Shihab al-Dîn al-Hamadani, who acquired it from Qutb al-Dîn al-Diyâ’i, who acquired it from Muhyiddîn Ibn Arabi, who acquired it from Abu al-'Abbas Ahmad ibn al-Turîzi, who acquired it from Abu Abdillah al-Qurashi, who acquired it from Abu Madîn al-Andalusi.

He also states that he acquired additional knowledge about the esoteric art of letters and the magical squares from Mohammad 'Izz al-Dîn ibn Jam’a, who acquired it from Mohammad al-Sirani, who acquired it from Shihab al-Dîn al-Hamadani, who acquired it from Qutb al-Dîn al-Dhiya’i, who acquired it from Muhyiddîn Ibn Arabi.

Al-Buni also states that he acquired his occult knowledge from Abu al-'Abbas Ahmad ibn Maymûn al-Qastalâni, who acquired it from Abu Abdillah Mohammed al-Qurashi, who acquired it from Abu Madîn Shu'ayb ibn Hasan al-Ansari al-Andalusi, who received it from Abu Ayyub ibn Abi Sa'id al-Sanhaji al-Armuzi, who received it from Abi Muhammad ibn Nur, who received it from Abu al-Fadhl Abdullah ibn Bashr, who received it from Abu Bashr al-Hasan al-Jujari, who received it from al-Saqati, who received it from Dawûd al-Tâ’i, who received it from Habîb al-A'jami, who received it from Abu Bakr Muhammad ibn Sîrîn, who received it from Malik ibn Anas.