Muhammad ibn Idris al-Shafi'i was a jurist of the early Abbasid period and the founder of the Shafi'i school, among the four Sunni legal schools. Born in Palestine in 767, he studied in Mecca, Medina and Baghdad before settling in Egypt, where he died in 820. His treatise the *Risala* is often called the first book of Islamic legal theory: it tried to settle, once and for all, how law should be drawn from the Quran and the example of the Prophet.
Sources for his life
Al-Shafi'i's biography is hard to pin down. The earliest life of him that survives was compiled more than a century after his death and is largely a collection of anecdotes, some of them plainly legendary, and the later biographies add more pious stories. Modern historians accept the broad outline below but treat many of the details with caution. Some have gone further: the scholar Norman Calder argued that the *Risala* and the *Umm*, the books on which al-Shafi'i's reputation rests, were largely written by his followers in his name, a view other specialists contest.
A poor boy of noble descent
He was born in 767, at Gaza by most accounts, though some place his birth at nearby Ashkelon. His family belonged to the Muttalib clan of Quraysh, the sister clan of the Prophet's own Banu Hashim, which gave him great prestige but no money. His father died when he was a small child, and his mother took him to Mecca, where her relatives could help. He grew up poor; one story says he wrote his lessons on animal bones because paper was too expensive. He learned the Quran by heart as a boy, became a skilled archer and poet, and is said to have spent time among the Hudhayl, a desert tribe famous for the purity of its Arabic.
Pupil of Malik
As a young man he went to Medina to study with Malik ibn Anas, whose *Muwatta* he is said to have already memorised. He stayed in Malik's circle for years, perhaps until the master's death in 795, and always called him "the Teacher", even when he later rejected parts of his method. Around the age of 30 he took a government post in Najran, in Yemen. There he became caught up in local politics, and in 803 he was sent in chains to Raqqa to face the caliph Harun al-Rashid, accused of supporting a rebel from the family of Ali. Others accused with him were executed; he was pardoned, by some accounts after the great Hanafi jurist al-Shaybani spoke for him. He never sought public office again.
Between two schools
In Baghdad, capital of the Abbasid Caliphate, al-Shafi'i studied the works of al-Shaybani, the leading pupil of Abu Hanifa, and argued hard with the Hanafi jurists, at first in defence of Malik's views. The experience gave him a rare knowledge of both of the great legal traditions of the day: the reason-based law of Iraq and the practice-based law of Medina. He left Iraq in 804; the sources disagree about where he went next, and whether he returned to Baghdad around 810. His teaching from this period is known as his "old school". Among his students was Ahmad ibn Hanbal, later the founder of the fourth Sunni school.
The Risala and the new school
Around 814 he moved to Egypt, where he spent his last years teaching and dictating in Fustat, the old capital that later grew into Cairo. There he revised his earlier work into what is called his "new school", set out in the *Umm*, a huge collection of rulings, and in the revised *Risala*.
The *Risala* asks a simple question: how do we know what God's law is? Al-Shafi'i's answer was that the Quran and the genuine sayings and actions of the Prophet are both binding, and that the Prophet's example, recorded in hadith, explains and completes the Quran. Where neither text speaks directly, a jurist may reason by analogy: wine is forbidden because it intoxicates, so date wine, which also intoxicates, is forbidden too. He insisted that a sound report from the Prophet outweighs local custom or a respected scholar's opinion, which put him at odds with the Malikis' reliance on the practice of Medina, and he rejected looser methods of reasoning such as the Hanafi "juristic preference". Later Shafi'i writers summed up his scheme as four sources of law: the Quran, the sunna, the consensus of scholars and analogy.
Death and legacy
Al-Shafi'i died in Fustat on 20 January 820. Some accounts say he died of an illness; others that he never recovered from a beating by supporters of a rival school. He was buried in the Qarafa cemetery, where Saladin later built a college beside his tomb and the Ayyubid dynasty raised the great domed mausoleum that still stands. His school took firm shape about a century later, especially through the teaching of Ibn Surayj in Baghdad, and for centuries it shared the central Islamic lands with the Hanafis. The historian Wael Hallaq has argued that the *Risala* itself drew little attention until the tenth century, but it came to be seen as the foundation of Islamic legal theory. Today the Shafi'i school prevails in Indonesia, Yemen and East Africa, among other places.
On our maps
Our 800 map shows the Abbasid Caliphate at the height of its power, when al-Shafi'i was studying and teaching in Arabia, Iraq and Egypt.
Key dates
- 767 CEBorn in Palestine, at Gaza by most accounts, into the Muttalib clan of Quraysh.
- c. 769 CEAfter his father's death his mother takes him to Mecca, where he grows up poor.
- c. 787 CEGoes to Medina to study with Malik ibn Anas, remaining in his circle until Malik's death in 795.
- c. 797 CETakes up an Abbasid post in Najran, in Yemen.
- 803 CEBrought in chains before Harun al-Rashid at Raqqa, accused of backing an Alid revolt, and pardoned.
- 804 CELeaves Iraq after studying the Hanafi law of al-Shaybani in Baghdad.
- c. 814 CESettles in Egypt, where he revises his teaching and dictates the Risala and the Umm.
- 820 CEDies in Fustat on 20 January and is buried in the Qarafa cemetery.
- c. 1211The Ayyubids build the great domed mausoleum over his grave.
From the atlas
Al-Shafi'i in time and on the map
Al-Shafi'i lived from 767 CE to 820 CE. Borders of Time has one world map from those years: 800 CE.
Living at the same time, among others on this site: Al-Khwarizmi (750–846 CE), Jabir ibn Hayyan (721–815 CE), Charlemagne (748–814 CE), Krum (755–814 CE), Kūkai (774–835 CE), Harun al-Rashid (766–809 CE), Ahmad ibn Hanbal (780–855 CE), Adi Shankara (788–820 CE), Malik ibn Anas (711–795 CE) and Babak Khorramdin (798–838 CE).
Events of those years: Vietnam under Chinese rule (111 BCE–938 CE), Arab–Byzantine wars (629–1050), Reconquista (722–1492), Battle of Roncevaux Pass (778 CE), House of Wisdom (800–1258), Christianization of Scandinavia (800–1200) and Carolingian Renaissance (800–900 CE).
Born just before and after, among others on this site: before, Abu Muslim (718–755 CE) and Abd al-Rahman I (731–788 CE); after, Al-Kindi (801–870 CE) and Huang Chao (801–884 CE).
Quick answers
- When was Al-Shafi'i born, and when did Al-Shafi'i die?
- Al-Shafi'i was born in 767 CE in Gaza City and died in 820 CE in El-Fustat, aged about 53.
- Who was Al-Shafi'i?
- Muhammad ibn Idris al-Shafi'i was a jurist of the early Abbasid period and the founder of the Shafi'i school, among the four Sunni legal schools.
- What does al-Shafi'i's Risala argue?
- It is a treatise on how to work out Islamic law from its sources, among the earliest books on the subject. It argues that the Quran and the authentic example of the Prophet are binding, that the Prophet's sunna explains and completes the Quran, and that human reasoning must be tied to those texts, mainly through disciplined analogy.
- How did al-Shafi'i die?
- He died in Fustat, the old capital of Egypt, in January 820, aged about 54. Some accounts say he died of illness; others say he died after being beaten by followers of a rival school, either Malikis angry at his criticism of their teacher's method or theologians of the Mu'tazili movement.
- Where is the Shafi'i school followed today?
- It is the main school of law in Indonesia, in Yemen and in much of East Africa. In the Middle Ages it shared much of the central Islamic world with the Hanafi school.