
Imam Al-Shafi'i was one of the greatest scholars in Islamic history and the founder of the Shafi'i school of law, one of the four main schools of Sunni Islam. He was born in 767 CE in Gaza, in Palestine, and died in 820 CE in Egypt at the age of about 53. He is best known for writing the first book on the principles of Islamic jurisprudence, a work called Al-Risala, which set out the rules for how scholars should draw laws from the Quran and the teachings of the Prophet Muhammad. His method shaped Islamic law for the next twelve centuries, and the school named after him is still followed by millions of Muslims today, from Egypt and East Africa to Yemen and Southeast Asia.
Early life and education
Al-Shafi'i was born into the Quraysh tribe, the same tribe as the Prophet Muhammad. His full name was Muhammad ibn Idris al-Shafi'i. His father died when he was young, and his mother took him to Makkah, where he grew up in modest circumstances. As a boy, he memorised the Quran, and he spent time with the Bedouin tribes outside Makkah, learning the pure Arabic of the desert. This training later helped him judge the exact meaning of words in the Quran and in hadith.
When he was still young, he travelled to Medina to study with Imam Malik ibn Anas, the great scholar of the city and the author of the Muwatta, one of the earliest collections of hadith and law. Al-Shafi'i memorised the Muwatta and impressed Malik with his memory and his questions.
After Medina, Al-Shafi'i went to Yemen, where he worked for a time as a judge. He was accused of supporting a political revolt and was sent in chains to Baghdad, the capital of the Abbasid caliphate. The caliph Harun al-Rashid heard his case and released him. In Baghdad, he studied with Muhammad ibn al-Hasan al-Shaybani, the leading student of Abu Hanifa, and learned the methods of the scholars of Iraq. By studying with the two great traditions, the people of hadith in Medina and the people of reasoned opinion in Iraq, he gained a rare combination of knowledge.
The scholar between two schools
In the early 800s, Islamic law was taking shape in two broad directions. The scholars of Medina, led by Malik, put the Quran and the hadith first and used the practice of the people of Medina as a guide. The scholars of Iraq, led by Abu Hanifa, used reasoned opinion and analogy more freely when no clear text answered a question.
Al-Shafi'i offered a middle path. He said that the Quran and the authentic sayings of the Prophet came first, and that no scholar's opinion could override a clear text. Where there was no text, a scholar could use analogy, comparing a new case to a case the texts had already settled, but only with strict rules. He rejected the idea that a community's local custom could overrule a hadith, and he rejected unrestricted personal opinion. At the same time, he accepted that reason had a role, and he gave it a clear and limited place.
This system brought order to a debate that had been growing confused. His students began to call his method the new science of usul al-fiqh, the principles of jurisprudence. Before him, scholars had used these methods without writing them down as a system. Al-Shafi'i was the first to put them in a book.
Al-Risala and the science of jurisprudence
Al-Shafi'i wrote his great book, Al-Risala, in two versions. The first was written in Iraq, and the second was written later in Egypt, when he had revised some of his views. The book answers a question that had been sent to him by a fellow scholar: what are the sources of Islamic law, and how do they relate to each other?
In Al-Risala, he listed the sources in order. First came the Quran. Second came the Sunnah, the practice and sayings of the Prophet, which he argued was also revelation and could explain the Quran. Third came consensus, the agreement of the scholars, which he accepted in a limited form. Fourth came analogy, the careful comparison of a new case with an old one. He also discussed how to judge whether a hadith was reliable, how to resolve apparent contradictions between texts, and how to understand words that could have more than one meaning.
The book was short by later standards, but it changed the field. Scholars who came after him, in every school of law, used his framework and argued with it. Al-Risala is still read and studied in Islamic schools today, more than twelve hundred years after it was written.
The old doctrine and the new doctrine
Al-Shafi'i taught in Baghdad for several years, and his views from that period are called his old doctrine, or qawl qadim. In 814 CE, he moved to Egypt, where he spent the last six years of his life. In Egypt, he met new scholars, studied new hadith, and changed his mind on several questions. His views from this period are called his new doctrine, or qawl jadid. When the Shafi'i school later took shape, it was built mainly on the new doctrine, the views of his Egyptian years.
His teaching circle in Egypt was held in the mosque of Amr ibn al-As in Fustat, the old capital of Egypt. Among his students there was al-Muzani, who wrote a summary of his teacher's rulings that became a standard text of the school. Another student, al-Rabi ibn Sulayman, recorded his lectures and helped to preserve the books that Al-Shafi'i dictated.
He lived simply, and accounts of his life describe a man who was generous with his students and quick to admit when a better argument had changed his mind.
His great legal work, Kitab al-Umm
Alongside Al-Risala, Al-Shafi'i dictated a large work of practical law called Kitab al-Umm, which means The Mother Book. It covers worship, trade, marriage, crime, and the duties of rulers, with the evidence for each ruling set out from the Quran and hadith. The book was not finished in his lifetime, but his students gathered his lectures and notes into the form in which it survives today, and it became the foundation for the Shafi'i school's later works.
Death and legacy
Al-Shafi'i died in 820 CE in Fustat, Egypt, after a short illness. He was buried in the cemetery of al-Qarafa in Cairo, and a shrine was later built over his tomb. The shrine, with its great wooden dome, became one of the famous monuments of Cairo and a place that scholars and visitors still come to see.
The school he founded spread far beyond Egypt. It became the dominant school in Egypt itself, in the Hijaz, in Yemen, in Kurdistan, in East Africa, and in the Muslim lands of Southeast Asia, including Malaysia, Indonesia, and Brunei. It was also strong in Syria and Palestine for centuries. Today, the Shafi'i school is followed by a large share of the world's Sunni Muslims, and its scholars still teach from his books.
His legacy is not only the school that carries his name. His greater legacy is the method he gave to Islamic law itself. By writing down the rules for using the Quran, the Sunnah, consensus, and analogy, he gave later scholars a shared language for their debates. Muslims of all four schools still study his framework, and Al-Risala remains the starting point for anyone who wants to understand how Islamic law is derived.
Frequently asked questions
Who was Imam Al-Shafi'i?
Imam Al-Shafi'i was a Muslim scholar born in Gaza in 767 CE and the founder of the Shafi'i school of Islamic law. He wrote Al-Risala, the first book on the principles of jurisprudence.
What is the Shafi'i school of thought?
The Shafi'i school is one of the four main schools of Sunni Islamic law. It puts the Quran and the authentic Sunnah first, then consensus, then carefully limited analogy. It is the dominant school in Egypt, Yemen, East Africa, and Southeast Asia.
What did Al-Shafi'i write?
His most famous book is Al-Risala, on the principles of jurisprudence. He also dictated Kitab al-Umm, a large work of practical law. His students preserved both works after his death.
Where is Imam Al-Shafi'i buried?
He is buried in the al-Qarafa cemetery in Cairo, Egypt. A shrine with a large dome was built over his tomb, and it is one of the historic monuments of the city.
Why is Al-Shafi'i important?
He was the first scholar to write down the rules for deriving Islamic law from its sources. His framework influenced all four Sunni schools, not only his own.
