# Shihab al-Din al-Qarafi

Shihāb al-Dīn Abu ’l-Abbās Aḥmad ibn Abi ’l-ʿAlāʾ Idrīs ibn ʿAbd al-Raḥmān ibn ʿAbd Allāh ibn Yallīn al-Ṣanhājī al-Ṣaʿīdī al-Bahfashīmī al-Būshī al-Bahnasī al-Miṣrī al-Mālikī (Arabic: شهاب الدين القرافي) (also known as simply known as Shihāb al-Dīn al-Qarāfī or al-Qarāfī, 1228–1285), was a Sunni Islamic scholar of Sanhaja Berber origin who lived in Ayyubid and Mamluk Egypt. He is widely regarded as the foremost Maliki juristconsult and legal theoretician of his time. He was highly proficient in scriptural exegesis, Islamic theology, grammar, lexicography, literature, ophthalmology, astronomy and mathematics. During his lifetime, al-Qarafi was hailed as one of the greatest scholars. He is considered to be one of the prominent influential thinkers and pioneers. According to Ibn Farhun, Shafi'ites and Malikites were unanimous that the best scholars in Egypt were three in number: al-Qarafi in Old Cairo, Ibn al-Munayyir in Alexandria, and Ibn Daqiq al-'Id in Fatimid Cairo. Imam al-Suyuti counted him among the scholars who attained the rank of mujtahid mutlaq [ar] (absolute/autonomous ijtihad).

## Name

He apparently grew up in al-Qarafa in Old Cairo, whence his sobriquet of al-Qarafi.

## Early life
### Birth

He was born in Bahfashīm, a village in the province of Bahnasa in 1228. This village belonged to the district of Būsh, a town just a few miles to the north of Beni Suef.

### Education

His father taught him in his hometown until the early teens, when he moved to Cairo in pursuit of higher education and more authoritative teachers. It is this city where he studied a number of sciences. According to his biographers, al-Qarafi studied at Sahibiyya, a Maliki madrasa in Cairo that was established sometime around 1214 by the vizier Safi l-Din 'Abd Allah al'Aziz ibn Shakr.

### Teachers

Little biographical material exists on al-Qarafi, which makes his educational background unclear. No teachers are mentioned by historians such as al-Safadi and al-Suyuti. Only four of al-Qarafi's teachers are listed by Ibn Farhun: the Shafi'i jurist Izz al-Din ibn 'Abd al-Salam, the Maliki jurist Al-Sharif al-Karaki (d. 688 or 9/1290 or 91), the accomplished Shafi'i theologian and legal theorist Shams al-Din al-Khusrushahi (d. 652/1254), who was a pupil of the renowned polymath Fakhr al-Din al-Razi, and the Hanbali jurist and Hadith scholar, Shams al-Din Abu Bakr Muhammad b. Ibrahim. 'Abd al-Wahid . 'Ali b. Surur (d. 676/1265). Others mentioned he studied with Ibn al-Hajib who taught him Maliki law and grammar, and he studied Hadith science under al-Mundhiri.
Without a doubt, the most significant of his teachers was the Damascene scholar, Izz al-Din ibn 'Abd al-Salam, who was regarded as the foremost Shafi'i authority of his era. His immense popularity and his independence in handling the political power earned him the moniker 'Sultan of the scholars." The biographers speculate that shortly after Ibn 'Abda al-Salam arrived in Cairo in 1241, at the age of thirteen, the youthful al-Qarafi became attached to him. Al-Qarafi's greatest gain in knowledge came from Ibn 'Abdal al-Salam, and al-Qarafi makes more references to him than any other scholar of his era in his writings.

## Scholarly life
### Scholastic expertise

While al-Qarafi is chiefly recognised for his expertise in legal theory (Usul al-Fiqh) and positive law (Furu al-Fiqh), his biographers have informed us that he was a skilled teacher in a number of other fields as well. Al-Dhahabi said: "He was an Imam (leader) in the principles of religion and jurisprudence, knowledgeable about Malik's doctrine, knowledgeable about interpretation (Qur'anic exegesis), involved in other sciences, and he had many useful works.” Scholars who claim to have studied logic and the skills of dialectic and disputation under al-Qarafi are documented in historical accounts. His writings on lexicography, grammar, mathematics, algebra, optics, and astronomy, as well as those cited in sources, offer us an idea of his wide-ranging interests and demonstrate what Jackson refers to as "an almost irreverent passion for knowledge." In his own evidence, al-Qarafi claimed to have also built mechanical automata and clocks.

### Positions

According to the medieval biographers like al-Dhahabi in his Tarikh al-Islam, al-Safadi, and Ibn Taghribirdi. Al-Qaradi was said to have held three positions. In the first, following the passing of Sharaf al-Din al-Subki (d. 669/1270), he was appointed professor at the renowned Salihiyya madrassa in Fatimid Cairo. The Ayyubid Sultan As-Salih Ayyub established this special madrassa in 1242, making it the first to have a chair of fiqh for each of the four schools of law. It was this institution that supplied the four candidates to occupy the newly created chief judgeship positions in 1265. It seems that al-Qarafi briefly lost his position at the Salihiyya to Nafis al-Din Ibn Shurk, but he eventually won it back and held onto it until his passing. It was this institution where al-Qaradi was able to assume a position of leadership among the Maliki jurists of his day. His second post, he served as a professor at the congregational mosque in Old Cairo (also known as the mosque of Amr ibn al-As) and his third job was at the Taybarsiyya madrassa. The latter was an attached madrassa for Shafi'i and Maliki pupils, attached to the Azhar Mosque, established in 1279 by the Mamluk amir 'Ala al-Din Taybars al-Waziri.

## Death

On Sunday, 30 Jumada 11 684/ 2 September 1285, al-Qarafi passed away at Dayr al-Tin, a village on the Nile bank in the Birkat al-Habash region, just south of Cairo. The following day, he was buried in the Qarafa cemetery.

## Legacy

He is considered by many to be the greatest Maliki legal theoretician of the 13th century; his writings and influence on Islamic legal theory (uṣūl al-fiqh) spread throughout the Muslim world. His insistence on the limits of law underscores the importance of non-legal (not to be confused with illegal) considerations in determining the proper course of action, with significant implications for legal reform in the modern Islamic world. His views on the common good (maslahah) and custom provide means to accommodate the space-time differential between modern and premodern realities.
He is also regarded as one of the most outstanding jurists in the Maliki school whose writings serve as one of bases of the Maliki jurisprudence. Al-Qarafi was considered highly influential legal scholar and pioneer who developed on Maqasid theory in his writings. He was the first to add the maqsad of 'ird/honour to the already recognized five Maqasid of Islamic Law.

## Works

Al-Qarafi was an energic and prolific writer who wrote on a wide range of topics, including theology, jurisprudence, legal theory, anti-Christian polemics, Arabic language sciences, Qur'anic interpretations, etc. Many of his works became highly revered and are considered major references till this day. His most famous books include:
* Al-dhakhirah ("The Stored Treasure") is one of the most important works in the Maliki madhhab, spanning several volumes, where the imam explains fiqh with evidences from usul al-fiqh in detail and has a strong personality in the way he presents the school.
* Al-furuq ("Differences")
* Nafais al usul ("Gems of Legal Theory")
* Kitab al-ihkam fi tamyiz al-fatawa an al-ahkam wa tasarrufat al-qadi wal-imam ("The Book of Perfecting the Distinction Between Legal Opinions, Judicial Decisions, and the Discretionary Actions of the Judge and the Caliph")
* Ajwiba l-fākhira ʿan al-as’ila l-fājira fī l-radd ʿalā l-milla l-kāfira ("Superb answers to shameful questions in refutation of the unbelieving religion") is a hefty apologetic work against Christian and Jews. The first part is a response to Paul of Antioch's Letter to a Muslim Friend.