DraftWritten with AI help from the sources it cites, and not yet read by a human editor.
At a glance
- Era
- The Early Abbasid Caliphate
- Identifiers
- WikidataVIAF
Life in time
In space
Map: Natural Earth, public domain · places and route from the graph
Muhammad ibn Idris al-Shafi'i was a great scholar who lived more than twelve hundred years ago; he gathered learning in Mecca, Medina, Iraq and Egypt and wrote the foundations of fiqh. Many Muslims follow his school today, and among his books are al-Risala and al-Umm.
Abu Abdullah Muhammad ibn Idris al-Shafi'i (150–204 AH), the imam of the Shafi'i school, was born in Gaza and raised in Mecca, memorizing the Qur'an and the Muwatta young. He travelled for hadith to Mecca, Medina, Iraq and Yemen, was among Malik's foremost students, then settled in Baghdad and then Egypt where he completed his school and wrote most of his works. He authored al-Risala in legal theory — the first known book on the discipline — and al-Umm in fiqh, and many imams followed his school. He died in Egypt where his tomb is.
Storytellers (10–12) read the Explorers text, then cross to the Scholars text.
Muhammad ibn Idris al-Shafi'i al-Qurashi al-Muttalibi (150–204 AH) is the imam of the Shafi'i school and the first to compose a separate book on legal theory. Born in Gaza, he was brought to Mecca as a child, memorized the Qur'an and the Muwatta, and travelled for hadith between the Hijaz, Iraq and Yemen; he kept close to Malik in Medina until his death, and argued with the Hanbalis, Muhammad ibn al-Hasan and the Iraqis, taking and replying. He settled in Baghdad then Egypt, where his school took its final form and he dictated the 'new' versions of his books. His works include al-Risala — the first known written treatise on usul al-fiqh — al-Umm, the Mukhtasar of al-Muzani and the Sunan, and fine verses on asceticism are told of him. He laid a method joining the people of hadith and opinion, building on Book, Sunna, consensus and analogy; among his students are al-Rabi' al-Muzani and al-Buwayti. He died in Fustat in 204 AH and is buried there, and his school spread through Egypt, Syria, Yemen and Southeast Asia.
Overview
Muhammad ibn Idris al-Shafi'i al-Muttalibi, imam of the Shafi'i school, who died in the days of al-Ma'mun. 1
Name, birth and lineage
The article in the Encyclopaedia of Islam gives his full name as Muhammad ibn Idris ibn al-Abbas ibn Uthman ibn Shafi, of the Quraysh, and calls him the eponym of the Shafi'i school rather than its founder. 2 All his biographers agree on a birth date of 150/767, the year Abu Hanifa died, and one tradition, often disputed, says the two events fell on the same day. The oldest source places his birth either at Ashkelon or in Yemen, while most biographers prefer Gaza; Mina near Mecca is also mentioned less often. 2
His genealogy was reckoned among the most prestigious: a man of Quraysh, he was a Muttalibi on his father's side, a distant relative of the Prophet through al-Muttalib, brother of Hashim. His mother is said by different sources to have belonged to the Yemeni tribe of Azd or to have descended from Ali ibn Abi Talib. The second view was disputed by Fakhr al-Din al-Razi and kept by al-Subki, and the article suggests it may partly explain his attitude at the time of his crisis. Later writers cite this lineage with hadiths about the Imams being from Quraysh, in order to stress the standing of the school, and he is often treated as the renewer of religion for the second century. 2
Childhood in Mecca
Orphaned of his father at the age of two, or ten by the source that places his birth in Yemen, he was taken by his mother, apparently without means, to Mecca, where the family had relatives. He lived modestly and took to poetry and archery. His eloquence and command of Arabic are said to come from long stays with Hudhayl, and are said to have been praised by al-Jahiz; a collection of poems is attributed to him, and a passage on archery appears in the Umm. 2 A biographers' anecdote tells how a spectator, Amr ibn Sawwad, told him he was a better scholar than archer, which apparently persuaded him to give himself wholly to learning. 2 3
Teachers in Mecca and Medina
His chief masters in Mecca were Muslim ibn Khalid al-Zanji, the city's mufti, and Sufyan ibn Uyayna, who later also taught Ibn Hanbal. At fifteen or eighteen he is said to have received permission to issue fatwas. He then turned to Malik ibn Anas of Medina. According to Ibn Abi Hatim, he had memorised Malik's Muwatta in Mecca and presented himself to Malik about 170/786, asking persistently to recite it; Malik agreed and was pleased with his eloquence. 3 He remained with Malik until Malik's death, about ten years by al-Razi's account, and always counted him his supreme master. Yet he later allowed himself a critical book, Ikhtilaf Malik wa-l-Shafi'i, which in its surviving form is the work of his Egyptian pupil al-Rabi al-Muradi; the Maliki school, especially in Egypt, did not forgive him for it and produced polemic directed at him. 3 In Medina he also studied under Ibrahim ibn Abi Yahya, whom the heresiographers call a follower of the Mu'tazila; al-Razi says this teacher taught him only law and hadith, not theology. 3
The crisis and the years in Iraq
The article warns that the biographers contradict one another, so that the order of his later life cannot be fixed precisely and the dates given are hypothetical, except that of his death. 3 It holds as certain that he was called to an official task at Najran in northern Yemen and compromised himself there by joining partisans of the Hasanid Yahya ibn Abd Allah. Ibn al-Nadim calls him a fervent Shi'i, which the article says can only be understood politically. This episode, which the biographers call his trial or crisis, ended with an appearance before the caliph Harun al-Rashid at Raqqa. Through the intervention of Muhammad ibn al-Hasan al-Shaybani he was pardoned, perhaps after a spell in prison, while nine co-defendants were executed. The hagiographic version credits the strength of his own argument. He later held no official post and refused the caliph's offer of the judgeship of Yemen. 3
He spent a first period in Iraq, perhaps two years, before or just after this crisis, and became acquainted with the legal school that had grown there from Abu Hanifa through his disciples Abu Yusuf and al-Shaybani. He attended al-Shaybani's circle, held disputations with him and later wrote a refutation of him. 3
Mecca, Baghdad and Egypt
He then returned to Mecca for some nine years, passing gradually from pupil to master. About 195/811 he was in Baghdad for roughly two years, where he composed the first, lost version of the Risala and texts that the Shafi'is call his old doctrine. He was again in Baghdad in 198/813 for a few months, and probably met Ibn Hanbal around then; the article doubts that the two were closely acquainted, despite many anecdotes linking them. 3 The reasons for his settling at Fustat in Egypt are little known. He was probably invited by the governor, but the article thinks the isolation imposed on him by Maliki dominance in the Hijaz and Hanafi dominance in Baghdad also pushed him to found a school elsewhere. 3
In Fustat the leading Maliki family, the Banu Abd al-Hakam, first welcomed him, and Muhammad ibn Abd Allah ibn Abd al-Hakam was among his keenest pupils before returning to the Malikis and writing against him. Egyptian Malikis soon criticised him and tried unsuccessfully to have him banished. 3 4 He taught in the mosque of Amr, his main pupils were Egyptians, and there he wrote the surviving version of the Risala and most of the texts collected in the Umm. 4
Last days, tomb and family
He died aged fifty-four on the last day of Rajab 204/20 January 820. The circumstances remain uncertain: some say a violent assault by a fanatical Maliki, others illness. He was buried in the tomb of the Banu Abd al-Hakam at the foot of the Muqattam hills. The complex around his mausoleum, often altered and restored, was built under the Ayyubids. The tomb is an object of veneration, and his mawlid is among the most important dates in Cairo. 4 He married twice and had four children, two sons, one of whom, Abu Uthman, became judge of Aleppo, and two daughters. 4
His theological views
The article says much ink has been spent on his theology, but that later interest in the question was in inverse proportion to his own; his few mentions of the people of kalam concern legal matters. It urges caution toward the creeds attributed to him, some of which suggest a forerunner of Ash'arism and others of Hanbalism, and calls one of them clearly apocryphal and another doubtful. It also treats as largely retrospective the accounts, by Ash'ari Shafi'is such as al-Razi and al-Subki, that he favoured kalam and those by traditionalist Shafi'is that he opposed it. One recent reading, which the article finds open to objection, presents him as a traditionalist aiming to oppose rationalist theology. 4 5
Legal theory and the Risala
According to the account the article gives, he composed the Risala at the request of the Basran traditionist Abd al-Rahman ibn Mahdi, and so instituted the science of usul al-fiqh; the article regards denials of this credit as polemical. The surviving text, in two manuscripts, was probably written in Egypt and reflects his final thinking; an earlier, substantially different version was composed in Iraq. 4 Modern scholarship following Goldziher and Schacht usually sees his contribution as a synthesis between the approach of Malik and that of Abu Hanifa as carried on by al-Shaybani, closer in spirit to the former and placed under traditionalism. 5
The core idea is that every act of a person bound by the law has a corresponding ruling, given either in the scriptural sources, the Qur'an and the Sunna, which he calls the foundation, or inferred from them by analogical reasoning. His originality, the article says, lay in defining, critically establishing and ranking these sources. He identified the Sunna strictly with the sayings, acts and tacit approval of the Prophet in firmly established reports, an argument aimed chiefly at Malik's followers, who tended to equate the practice of Medina with that of the Prophet. His critique of conformism belongs with this. He distinguished two kinds of analogy, by cause and the weaker analogy by resemblance, both requiring a legal proof. Against Abu Hanifa's partisans, who were reputed to rely on opinion and istihsan, he argued that such reasoning brings arbitrariness into understanding the law; al-Ghazali attributes to him the maxim that whoever applies istihsan has legislated. 5 The article states that he held his distance from both camps with the message to return to the proof, and that in this sense he was anything but a traditionalist, since he changed the notion that the community remained in immediate contact with revelation. It adds that the Risala long remained a dead letter and the science of usul developed fully only after the fourth/tenth century, but that it is not certain the work's traditional importance is exaggerated, a thesis the article notes was put by W. B. Hallaq. Two further works on legal theory, Ibtal al-istihsan and Jima al-ilm, survive. 5
Works of fiqh and hadith
The article notes that no monograph exists on his practical law and that biographers are confused about his fiqh works. It again separates two periods. The first, in the Hijaz and Iraq, produced the lost Hujja, best transmitted by the Baghdadi pupil al-Hasan al-Zafarani. The new doctrine was elaborated in Egypt and is recorded in the monumental Umm, whose edition also holds other texts, some from the Iraqi period according to Schacht. The Mabsut mentioned by al-Bayhaqi is probably the same book as the Umm. The surviving Ahkam al-Qur'an is a compilation by al-Bayhaqi from his texts, not the lost original. 5
As a traditionist he wrote a Musnad and the Ikhtilaf al-hadith. He was criticised by Malikis and later by followers of Ibn Hanbal: for being an unreliable transmitter, since neither al-Bukhari nor Muslim accepted reports transmitted by him, for resting some points on doubtful traditions, and for trusting unacceptable transmitters such as Ibrahim ibn Abi Yahya. Al-Bayhaqi wrote a book to clear him of these charges. 5 The biographers also mention his wide knowledge of medicine and physiognomy and an interest in astrology that he later gave up. 5
His death
Al-Mas'udi says he died on the night of Friday in Rajab 204 AH, and was buried the next morning at the age of fifty-four. Al-Sari ibn al-Hakam, the governor of Egypt, prayed over him. He was buried in the cemetery of the Banu Abd al-Hakam. 6
In al-Suyuti
Al-Suyuti relates that al-Mutawakkil regretted not having reached his time, and mentioned a dream he related from the Prophet about Ibn Idris. Al-Suyuti considers that al-Mutawakkil was a follower of the Shafi'i school, and that he was the first of the caliphs to adopt it. 7
Related works
The museum's data attribute to him the book Ikhtilaf al-Hadith 8, and make him the founder of the Shafi'i school.
From Sheikh Omar Abdelkafy's Tafsir lectures (episode 10)
The Sheikh reports from Imam al-Shafi'i that he thought poetry diminishes the dignity of scholars, and mentions that the Arabs said the most eloquent poetry is the most untrue 9.
From Sheikh Omar Abdelkafy's lecture series Al Dinu Al Qayem
Sheikh Omar Abdelkafy recounts that Ahmad ibn Hanbal prayed for al-Shafi'i after every prayer 10. He recounts that critics faulted al-Shafi'i for visiting Ahmad often, and that he answered that the favour lies in both visits 11.
He recounts that when Ahmad fell ill, al-Shafi'i feared that Ahmad would die and the knowledge he held would die with him; al-Shafi'i himself fell ill from that fear, and then Ahmad forced himself to visit him 12. He recites two lines of al-Shafi'i on this theme, in which the sick friend is healed by seeing his friend 13.
He recounts that the young al-Shafi'i, about nine years old by the sheikh's account, attended Malik's assembly in the Prophet's mosque. A man swore divorce on his wife and asked Malik; the young al-Shafi'i answered first, and Malik ruled that the divorce did not take effect 14 15 16 17.
From Sheikh Omar Abdelkafy's lectures: Memorisation and sin
From Sheikh Omar Abdelkafy's lectures: Verse and attributed sayings
He quotes verses by al-Shafi'i on envy and on God's giving . 20
He quotes a saying attributed to al-Shafi'i in which he thanks God for giving him Islam without his asking, and asks for paradise . 21
He says that in prisons people say they are free, and at graves one remembers that life endures; he cites a verse attributed to al-Shafi'i on holding fast to a sincere friend . 22
He recites a verse of Imam al-Shafi'i: he loves the righteous though he is not one of them, hoping to share their intercession, and he dislikes those who trade in sins. 23
He quotes al-Shafi'i saying that a free person, when found, should be held on to, because free people are few . 24
From Sheikh Omar Abdelkafy's lectures: Calm in prayer
He cites a hadith about the man who prayed hastily and was told to pray with calm, and he says that the school named after al-Shafi'i counts calm in bowing and prostration as a pillar of prayer . 25
From Sheikh Omar Abdelkafy's lectures: Knowledge and fairness
He describes Imam al-Shafi'i as having filled the earth with knowledge, as the founder of the principles of jurisprudence, as from the Quraysh, and as a student of Malik, who was himself a teacher of Ahmad ibn Hanbal, as the Sheikh puts it . 26
He mentions illnesses that families conceal, and recounts the story of Imam al-Shafi'i who disclosed a defect in goods he sold, and he gives a figure for the sale price . 27
He asks listeners to write down "the eight" that he mentions, and he praises the wisdom of al-Shafi'i's sayings . 28
From Omar Abdelkafy's programme Wa Nafsin wa ma Sawwaha
The Sheikh relates that al-Shafi'i, past seventy, still had white, strong teeth, and when asked said they were God's trusts that he guarded in youth, so God guarded them for him in old age; the Sheikh explains that he guarded them from eating the unlawful and from attacking people's honour and slandering them . 29 30 See: slandering people.
Your choice is kept in this browser only.
Opinions on the question
First opinion · Sunni tradition (the museum's frame) · Sunni view (not yet sourced)Main reference
More opinions (2)
The speaker's view (personal opinion) viewOther opinion
Academic or other views (not yet sourced) viewSecondary opinion
Connections
- Taught
- Abd al-Aziz ibn Imran al-Khuza'i· Abd al-Aziz ibn Yahya al-Kinani· Abu Zayd Abd al-Hamid ibn al-Walid al-Kabd· Abu Thawr al-Kalbi· Ahmad ibn Hanbal· Ahmad ibn Yahya al-Mutakallim· Abu Ya'qub al-Buwayti· al-Hasan ibn Muhammad al-Za'farani· Al-Humaydi, Abd Allah ibn al-Zubayr· al-Muzani· Al-Rabi ibn Sulayman al-Jizi· al-Rabi' ibn Sulayman· Al-Rabi ibn Sulayman al-Muradi· Ibn al-Madini· Muhammad ibn Abd Allah ibn Abd al-Hakam· Musa ibn abi al-Jarud· Sulayman ibn Dawud al-Hashimi
- Born in
- Gaza
- Died in
- Al-Fustat
- Buried in
- Mausoleum of Imam al-Shafi'i, Cairo
- Authored
- Ikhtilaf al-Hadith· Ahkam al-Qur'an (al-Shafi'i)
- Founder of
- The Shafi'i school (madhhab)
- Participated in
- Last illness, words to al-Muzani and burial of al-Shafi'i in Egypt
- Subject of
- The Biography of the Messenger of God 2026, episode 1: Opening of the Sira, Its Importance and Its Aims· The Biography of the Messenger of God 2026, episode 21: Jurisprudence of Emigration· The Prophetic Biography for Reformers, episode 1: Introduction· The Prophetic Biography for Reformers, episode 11: The Death of Abu Talib· Al-Dar al-Akhira (The Hereafter) lesson series· Al-Din al-Qayyim (programme)· Al-Munjiyat (programme)· Al-Naba' al-Safi (programme)· Al-Buyut al-Amina (Safe Homes)· Al-Wa'd al-Haqq (The True Promise) programme· Mawkib al-Nour (Procession of Light) programme· Min Kunuz al-Sunna (From the Treasures of the Sunna) programme· Mudhakkirat Iblis (Memoirs of Iblis) programme· Muktatafat min al-Sira (lecture series)· Sharh Sahih al-Bukhari (Explanation of Sahih al-Bukhari) programme· Silsilat Ibab al-Rahman (Ramadan lessons)· Qissa wa 'Ibar (lecture series)· Tafsir al-Qur'an al-Karim (lecture series)· Tariq al-Noor (Ramadan lessons)· Wa Nafsin wa ma Sawwaha (programme)
- Mentioned in
- al-Burhan fi Usul al-Fiqh· Ma'alim al-Sunan· Muwatta 77· Muwatta 88· Muwatta 540· Muwatta 584· Muwatta 587· Muwatta 615· Muwatta 629· Muwatta 797
- Related to
- Foreign words in the Qur'an: are there words from outside Arabic?· Learning Arabic in the reports of the Companions and Successors and the words of the scholars· The authority of the Sunna (hujjiyyat al-sunna)· The scholars' dispute over non-Arabic words in the Qur'an: three positions on the mu'arrab· The duty to learn Arabic for worship: the four Sunni schools
People and things also explored
Umar ibn al-Khattab· Abu Hanifa al-Nu'man ibn Thabit· Abu al-Hasan al-Basri· Ibrahim (Abraham)· Musa· Umar ibn Abd al-Aziz· Uthman ibn Affan· Tawba (repentance)
Sources
- Tarikh al-Khulafa — al-Suyuti (Dar al-Minhaj edition) , p.518
- Encyclopaedia of Islam, 2nd edition (Leiden: Brill, 1954–2008), 13 volumes , vol. 9 p. 190
- Encyclopaedia of Islam, 2nd edition (Leiden: Brill, 1954–2008), 13 volumes , vol. 9 p. 191
- Encyclopaedia of Islam, 2nd edition (Leiden: Brill, 1954–2008), 13 volumes , vol. 9 p. 192
- Encyclopaedia of Islam, 2nd edition (Leiden: Brill, 1954–2008), 13 volumes , vol. 9 p. 193
- Muruj al-Dhahab — al-Masʼudi , p.417-418
- Tarikh al-Khulafa — al-Suyuti (Dar al-Minhaj edition) , p.545-546
- Kashf al-Zunun an Asami al-Kutub wa'l-Funun — Hajji Khalifa (Furqan ed.)
- Assabile archive of Omar Abdelkafy's lectures (audio and video) , Tafsir Al Quran Al Qareem, episode 10, at 00:30:30 · Listen at the archive (opens the audio at this time)
- Assabile archive of Omar Abdelkafy's lectures (audio and video) , Al Dinu Al Qayem, episode 1, at 00:18:00 · Listen at the archive (opens the audio at this time)
- Assabile archive of Omar Abdelkafy's lectures (audio and video) , Al Dinu Al Qayem, episode 1, at 00:18:30 · Listen at the archive (opens the audio at this time)
- Assabile archive of Omar Abdelkafy's lectures (audio and video) , Al Dinu Al Qayem, episode 1, at 00:19:00 · Listen at the archive (opens the audio at this time)
- Assabile archive of Omar Abdelkafy's lectures (audio and video) , Al Dinu Al Qayem, episode 1, at 00:19:30 · Listen at the archive (opens the audio at this time)
- Assabile archive of Omar Abdelkafy's lectures (audio and video) , Al Dinu Al Qayem, episode 13, at 00:46:00 · Listen at the archive (opens the audio at this time)
- Assabile archive of Omar Abdelkafy's lectures (audio and video) , Al Dinu Al Qayem, episode 13, at 00:46:30 · Listen at the archive (opens the audio at this time)
- Assabile archive of Omar Abdelkafy's lectures (audio and video) , Al Dinu Al Qayem, episode 13, at 00:47:00 · Listen at the archive (opens the audio at this time)
- Assabile archive of Omar Abdelkafy's lectures (audio and video) , Al Dinu Al Qayem, episode 13, at 00:47:30 · Listen at the archive (opens the audio at this time)
- Assabile archive of Omar Abdelkafy's lectures (audio and video) , Al Naba Al Safi, episode 1, at 00:19:30 · Listen at the archive (opens the audio at this time)
- Assabile archive of Omar Abdelkafy's lectures (audio and video) , Al Naba Al Safi, episode 4, at 00:19:30 · Listen at the archive (opens the audio at this time)
- Assabile archive of Omar Abdelkafy's lectures (audio and video) , Al Naba Al Safi, episode 3, at 00:21:00 · Listen at the archive (opens the audio at this time)
- Assabile archive of Omar Abdelkafy's lectures (audio and video) , Al Naba Al Safi, episode 6, at 00:31:30 · Listen at the archive (opens the audio at this time)
- Assabile archive of Omar Abdelkafy's lectures (audio and video) , Al Naba Al Safi, episode 13, at 00:35:00 · Listen at the archive (opens the audio at this time)
- Assabile archive of Omar Abdelkafy's lectures (audio and video) , Al Naba Al Safi, episode 19, at 00:35:00 · Listen at the archive (opens the audio at this time)
- Assabile archive of Omar Abdelkafy's lectures (audio and video) , Al Naba Al Safi, episode 24, at 00:26:00 · Listen at the archive (opens the audio at this time)
- Assabile archive of Omar Abdelkafy's lectures (audio and video) , Al Naba Al Safi, episode 14, at 00:16:00 · Listen at the archive (opens the audio at this time)
- Assabile archive of Omar Abdelkafy's lectures (audio and video) , Al Naba Al Safi, episode 18, at 00:02:30 · Listen at the archive (opens the audio at this time)
- Assabile archive of Omar Abdelkafy's lectures (audio and video) , Al Naba Al Safi, episode 17, at 00:25:30 · Listen at the archive (opens the audio at this time)
- Assabile archive of Omar Abdelkafy's lectures (audio and video) , Al Naba Al Safi, episode 18, at 00:05:30 · Listen at the archive (opens the audio at this time)
- Assabile archive of Omar Abdelkafy's lectures (audio and video) , Wa Nafsun Ma Sawaha, episode 8, at 00:07:30 · Open the lesson at the archive
- Assabile archive of Omar Abdelkafy's lectures (audio and video) , Wa Nafsun Ma Sawaha, episode 8, at 00:08:00 · Open the lesson at the archive
- Abu Abd Allah al-Shafi'i — Encyclopaedia Britannica
- Wikidata
Cite this page
islam.museum contributors. “Muhammad ibn Idris al-Shafi'i”. islam.museum, https://islam.museum/en/person/al-shafii/. CC BY-SA 4.0. Last updated 2026-11-23.
Improve this page on GitHub · Report an error · Help complete it · JSON