Abbasid Dynasty Minor 204 AH (820 CE)

Death of Imam ash-Shafi'i

وفاة الإمام الشافعي

Cairo, Egypt

# Imam al-Shafi'i: The Founder of Usul al-Fiqh

Origins and Early Life: A Scholar Born in Adversity

Muhammad ibn Idris al-Shafi'i (may Allah have mercy on him) was born in 150 AH / 767 CE — the same year, as scholars have noted, that the great Imam Abu Hanifah (may Allah have mercy on him) died. Whether this coincidence carries deeper meaning is a matter scholars have pondered with appreciation rather than certainty, but it captures something true about al-Shafi'i's place in Islamic history: he arrived at precisely the moment the tradition required his particular gifts.

He was born in the city of Gaza in the Palestinian region, to a family of the Banu Muttalib — the same Hashimite clan as the Prophet Muhammad ﷺ, though the Shafi'i branch had long since settled outside the Hijaz. His father died before he was two years old, leaving his mother in poverty. She brought him back to Mecca, the ancestral home of the Quraysh, where he was raised in the quarter of the Banu Muttalib. Poverty marked his early years — it is reported that he could not afford paper for his studies and wrote on bones and pottery shards. Yet his memory was extraordinary even as a child. He memorized the Quran by the age of seven. By age ten, he had memorized Imam Malik's al-Muwatta — the entire compilation of Medinan hadith and legal reasoning — and recited it before scholars in Mecca who verified his retention.

His early teachers recognized his gifts and directed him toward the formal circuits of Islamic learning. He traveled to Medina to sit before Imam Malik ibn Anas (may Allah have mercy on him) himself, the supreme authority of the Hijaz and the author of the work al-Shafi'i had memorized. Malik reportedly said of him: "If you apply yourself, you will reach a great station." This was not empty encouragement. Al-Shafi'i studied under Malik for years, absorbing the Medinan tradition — its hadith, its understanding of the practice ('amal) of Medina as a source of legal authority, its reverence for the transmitted knowledge of the Companions who had lived there.

The Baghdad Years: Encountering the Iraqi Tradition

After Imam Malik's death (179 AH), al-Shafi'i spent time in Yemen in an administrative capacity, then traveled to Baghdad, where he encountered the tradition he had not yet mastered: the Hanafi school founded by Abu Hanifah and developed by his student Muhammad ibn al-Hasan al-Shaybani. Al-Shafi'i studied under al-Shaybani intensively, learning the Iraqi methodology from one of its masters. This was not capitulation to an opposing school; it was intellectual honesty. Al-Shafi'i understood that he could not build a comprehensive theory of Islamic law without understanding both major approaches: the Hijazi tradition's emphasis on transmitted hadith and the Medinan practice, and the Iraqi tradition's more systematic use of analogical reasoning (qiyas) and legal theory.

The friction between these traditions was real and substantive. The Hijazi scholars believed the Iraqis relied too heavily on reason at the expense of transmitted reports from the Prophet ﷺ. The Iraqi scholars believed the Hijazis sometimes accepted weak or interrupted chains of transmission when stronger rational analogies were available. Al-Shafi'i saw both the validity of the concerns and the incompleteness of each tradition without the other.

His first period in Baghdad (around 184-195 AH) produced brilliant public debates. He engaged al-Shaybani in celebrated exchanges on legal methodology, reportedly winning the respect of his opponents even when he demolished their positions. The Baghdadi scholars recognized they were encountering an intellect of the first rank.

Al-Shafi'i's decisive contribution to Islamic civilization was not primarily his legal opinions — though these were numerous and sophisticated — but his creation of the field of usul al-fiqh (the principles of Islamic jurisprudence) as a systematic discipline. Before al-Shafi'i, scholars practiced Islamic legal reasoning skillfully, but no one had articulated the theory behind the practice in a comprehensive, organized way. Questions that had been answered by custom and intuition — What counts as an authoritative hadith? How does the Quran abrogate earlier rulings? When does consensus (ijma') have binding force? When should analogy (qiyas) be applied? — were answered in scattered writings and oral traditions without a unified theoretical framework.

Al-Risala (The Letter/Epistle), al-Shafi'i's foundational work, changed this. Composed initially as a letter in response to the Maliki scholar Abd al-Rahman ibn Mahdi's request for a comprehensive account of legal reasoning, it became the first systematic treatment of Islamic jurisprudence. Its four-source hierarchy remains the framework that most Sunni legal schools formally accept:

First, the Quran — the direct revelation from Allah, the primary source of all law. Al-Shafi'i examined in detail how Quranic verses are to be interpreted, how apparent contradictions are resolved, and how general Quranic principles relate to specific rulings.

Second, the Sunnah of the Prophet ﷺ — and here al-Shafi'i made his most contentious and ultimately most influential argument. Against those who prioritized local practice (the Medinan 'amal) or rational extension over specific hadiths, al-Shafi'i argued forcefully that authentic hadith — even reports transmitted by a single reliable narrator (khabar al-wahid) — were legally binding. The Prophet ﷺ had said and done things that were part of revelation in a broader sense: "He does not speak from desire; it is nothing but revelation revealed" (53:3-4). To dismiss an authentic hadith because it conflicted with a scholar's reasoning was to set human intellect above prophetic guidance, which al-Shafi'i considered untenable.

Third, ijma' — the consensus of the Muslim scholarly community on a matter, which al-Shafi'i argued had a binding character, since the Prophet ﷺ had promised that his community would not collectively agree on error.

Fourth, qiyas — analogical reasoning, extending a ruling from an established case to a new case on the basis of a shared underlying cause ('illah). Al-Shafi'i accepted qiyas as legitimate but subordinate to the three prior sources.

The Two Schools: Old and New

Al-Shafi'i returned to Baghdad for a second period, then made a decision that would produce one of the most remarkable intellectual phenomena in Islamic jurisprudence: he moved to Egypt in 199 AH, encountered a richer hadith tradition than he had known in Iraq, and systematically revised a substantial portion of his legal opinions. The "Old School" (al-madhhab al-qadim) based in Baghdad and the "New School" (al-madhhab al-jadid) based in Egypt are both preserved in the tradition. In most matters, the New School prevails; in a few areas, later scholars have preferred the Old School position.

His greatest students — al-Muzani, al-Buwayti, and the young Ahmad ibn Hanbal — transmitted the New School's positions. Ahmad ibn Hanbal, who would become the founder of the fourth great Sunni school, said of al-Shafi'i: "I have not seen anyone who adhered more to the Sunnah than al-Shafi'i." This from a man who was himself legendary for hadith scholarship.

Al-Shafi'i's famous declaration — "When a hadith is authenticated, that is my school (madhhab)" — encapsulates his approach. He was not building a system to be defended regardless of evidence; he was articulating principles that could perpetually self-correct against authentic prophetic guidance.

Death in Egypt and the Tradition He Left

Muhammad ibn Idris al-Shafi'i died in Fustat (Old Cairo), Egypt, on the last day of Rajab, 204 AH / 820 CE, at the approximate age of fifty-four. He had been in poor health for some time, suffering from hemorrhoids and related illness. The account of his death includes a beautiful detail: a student asked him in his final days about his state, and he replied: "I am departing from this world, separating from my brothers, drinking from the cup of death, and presenting before Allah. By Allah, I do not know if my soul is heading toward Paradise or to the Fire." This was not doubt about the faith, but the trembling awareness of the divine judgment that characterized the greatest scholars.

Ibn Kathir records in al-Bidaya wa-l-Nihaya that al-Shafi'i's funeral in Egypt drew enormous crowds. He was buried in the Qarafa cemetery in Fustat, where his tomb remains a visited site today. The Ayyubid Sultan Saladin later built a dome over his grave in 608 AH — itself significant, as the Ayyubids were Shafi'i in their legal school.

The Shafi'i school he founded spread eastward — to the Shafi'i scholars of Iraq, to Yemen, to Persia and Central Asia, and eventually to East Africa and Southeast Asia, where it remains the dominant school today in countries including Malaysia, Indonesia, Somalia, and much of the East African coast. In Egypt, the Shafi'i school competed with the Maliki for centuries before the Hanafi school of the Ottoman Empire became institutionally dominant.

His legacy is not primarily any single legal opinion but the framework he created: the discipline of usul al-fiqh that every subsequent scholar — whether Hanafi, Maliki, Shafi'i, or Hanbali — has used, critiqued, modified, or built upon. Before al-Shafi'i, Islamic jurisprudence was practiced with great skill but theorized with no systematic coherence. After him, every serious legal scholar had to engage with his framework, even if only to argue against elements of it. This is the mark of a genuine intellectual founding: not that everyone agrees, but that no one can proceed as if the work was never done.

His Character and Personal Qualities

Beyond his jurisprudential contributions, al-Shafi'i was celebrated for his personal character. He was famously sharp in debate — his verbal exchanges with scholars of other traditions were sometimes withering in their precision — but equally known for his generosity and humility outside of formal scholarly exchange. He reportedly gave away in charity whatever he possessed at the end of each day, going to bed with nothing.

His poetry was widely admired. He composed verses on patience, on the pursuit of knowledge requiring travel from one's homeland, on the importance of silence and restraint in speech. One of his most quoted lines: "Be not one of those whose affairs are matters of dispute, but take the side that is more cautious and closer to scrupulousness."

He said: "The worst of situations is one in which you are uncertain yet act with certainty; and the best of situations is one in which you are certain yet still act with precaution." Such maxims reveal a mind that was not merely technically brilliant but genuinely formed by the Quranic and prophetic ethos it had spent a lifetime studying.

Sources:

  • Ibn Kathir, Ismail. al-Bidaya wa-l-Nihaya. Edited by Ali Shiri. Beirut: Dar Ihya al-Turath al-Arabi, 1988. Vol. 10.
  • Ibn Abi Hatim al-Razi, Abd al-Rahman. Adab al-Shafi'i wa Manaqibuhu. Edited by Abd al-Ghani Abd al-Khaliq. Beirut: Dar al-Kutub al-Ilmiyyah, 1953.
  • Al-Bayhaqi, Ahmad. Manaqib al-Shafi'i. Edited by Ahmad Saqr. Cairo: Dar al-Turath, 1971.
  • Al-Nawawi, Yahya. Tahdhib al-Asma wal-Lughat. Beirut: Dar al-Kutub al-Ilmiyyah, n.d.
  • Al-Subki, Taj al-Din. Tabaqat al-Shafi'iyyah al-Kubra. Edited by Abd al-Fattah Muhammad al-Hulw. Cairo: Hajr, 1992. Vol. 1–2.
  • Al-Shafi'i, Muhammad ibn Idris. al-Risala. Edited and translated by Majid Khadduri. Cambridge: Islamic Texts Society, 1987.
  • Hallaq, Wael B. The Origins and Evolution of Islamic Law. Cambridge: Cambridge University Press, 2005.

For the Prophetic era, see the Seerah timeline .