Al Imam Al Shafi’i, The First to Codify the Principles of Islamic Law


By:Taha Jabir Al ‘Alwani


Al Imam al Shafi’i was horn in 150 AH, the year in which al Imam Abu Hanifah died. He studied Fiqh, first in Makkah with some scholars of Ahl al Hadith, such as Muslim ibn Khalid al Zinji (d 179) and Sufyan ibn ‘Uyaynah (d 198). Then he went to the Imam of Madinah and leader of Ahl al Hadith, Malik ibn Anas, and studied with him, and committed to memory (so as later to relate it) his collection of Hadith and legal opinions, the Muwatta. Indeed, al Imam al Shafi’i ever felt himself indebted to al Imam Malik.

It is reported that Yunus ibn ‘Abd al A’la heard al Imam al Shafi’i say: “whenever the ‘Ulama’ are mentioned [and their work and knowledge compared], Malik outshines them all. No one has ever done me a greater favour than Malik ibn Anas.”40 This is what al Imam al Shafi’i said after he had studied language, poetry, literature, some of the natural and mathematical sciences, and history.

Al Imam al Shafi’i was not impressed with all that he learned of the work of Ahl al Hadith. For example, he criticized them for their accepting a Hadith which Munqati’41, saying: “The Munqati’ is nothing.”

Al Imam al Shafi’i also criticized them for accepting the Mursal42 variety of Hadith, (though he himself made an exception in the case of Mursal Hadith related by Sa’id ibn al Musayyab,) and for imposing overly strict conditions for the acceptance of narrators as reliable (and the Hadith they related as authentic).

When al Imam al Shafi’i went to Iraq, the stronghold of Ahl al Ra’i, he noticed that they were ever eager to find fault with the legal methods and opinions of the people of Madinah, and especially of his teacher, al Imam Malik. Thus, al Imam al Shafi’i stood up in defense of his teacher, his school of thought and his methods. It is narrated that he once said:

Muhammad ibn al Hasan said to me: “Our teacher (i.e. Abu Hanifah) was more knowledgeable than yours. Your teacher should not have spoken, but our teacher would have been wrong to remain silent.” I became angry and said to him: “I ask you by Allah, who had more knowledge of the Sunnah of the Prophet, Malik or Abu Hanifah?” He said, “Malik. But our teacher was more adept at Qiyas.” I replied, “Yes, and Malik was more knowledgeable than Abu Hanifah about the Qur’an, about its abrogation, and about the Sunnah of the Prophet. Whoever has more knowledge of the Qur’an and Sunnah has more right to speak!”43

Al Imam al Shafi’i studied the books of Muhammad ibn al Hasan and other Iraqi scholars44. Indeed, he became Muhammad ibn al Hasan’s pupil, and discussed his opinions, all the while supporting the Sunnah and Ahl al Hadith.

Al Imam al Shafi’i left Baghdad for a period of time, and when he returned, in 195 AH, there were forty or fifty study-circles that met regularly in the great mosque. Al Imam al Shafi’i began moving from one circle to another, explaining what “Allah and the Prophet said”, while other teachers spoke only of what their teachers said. Eventually, there were no study groups in the mosque other than al Imam al Shafi’i’s study group.

Some of the great scholars of the Ahl al Ra’i, like Abu Thawr, al Za’farani, al Karabisi and others, attended the study circles of al Imam al Shafi’i. Many abandoned the way of Ahl al Ra’i and began to follow al Imam al Shafi’i. Al Imam Ahmad ibn Hanbal also attended this circle, and it is narrated that he said: “Any narrator of Hadith who ever carried an inkpot benefited in some way from al Imam al Shafi’i”. when al Imam Ahmad was asked to explain, he said: “The Ahl al Ra’i used to laugh at Ahl al Hadith until al Imam al Shafi’i taught them otherwise, and vindicated the traditionist position through sound arguments.”45

Moreover, it was in response to a request from Ahl al Hadith, that al Imam al Shafi’i wrote his book, Al Hujjah (The Argument), in Baghdad, in order to refute the arguments which Ahl al Ra’i brought against him.46

Thereafter, al Imam al Shafi’i travelled to Egypt where he found that most of the people adhered strictly and unquestioningly to the opinions of Malik. Consequently, al Imam al Shafi’i began a critical analysis of Malik’s legal opinions, and found that in some cases, “…he (Malik) formulates opinions on the basis of a general principle, while ignoring the specific issue; whereas at other times he gives a ruling on a specific issue and ignores the general principle.”

Al Imam al Shafi’i also found that Malik sometimes rejected a sound Hadith in favour of a statement made by one of the Sahabah or the Tabi’un, or in preference to his own reasoning. Sometimes, al Imam al Shafi’i discovered, Malik rejected the statement of one of the Sahabah in favour of the opinion of a Tabi’i, or his own personal opinion; and that he would do this in individual cases, and in extrapolating legal details, without taking general principles into account. Moreover, Malik claimed in many cases that there was Ijma’ concerning the matter, when there was, in fact, disagreement about it.

Al Imam al Shafi’i also found that Malik’s opinion that the Ijma’ of the people of Madinah could be treated as source-evidence was, in fact, not very strong. He wrote a book entitled Al Ikhtilaf Ma’a Malik “Disagreement with Malik; in which he dealt with all of the matters mentioned above.47

According to al Imam al Shafi’i, al Imam Malik exceeded proper bounds in applying his principle of al Masalih al Mursalah (the Interest of the Greater Good) without having recourse to the abundance of source-evidence available. His opinion in regard to Abu Hanifah was that, in many cases, he concentrated on the particular, on minor issues and details, without regard for basic rules and principles.48

With these matters in mind, then, al Imam al Shafi’i came to the conclusion that the undertaking most deserving of attention was the collection of the principles of jurisprudence, the organization of the basic rules for their application, and the development of a source methodology by means of which questions of Fiqh may be decided through proper recourse to valid and relevant forms of evidence. Thus, Fiqh might become the practical application of this methodology, so that a new Fiqh might emerge as an alternative to the two established schools of legal thought.

It was for this reason that al Imam al Shafi’i wrote the Risalah, and built his Fiqh and legal teachings on the foundations of the principles and methodology he expounded in his book.

Al Imam Ahmad ibn Hanbal said: “Until al Imam al Shafi’i came along, we never thought of things like the general and the specific al ‘Umum wa al Khusus“.49

Al Imam al Shafi’i used to say to Imam Ahmad: “You have more knowledge about Hadith and narrators than I. So, if a Hadith is authentic, then tell me. If it is authentic, I will accept it, even if it is (reported by narrators) from Kufah, Basrah or Damascus.50 This statement clearly indicates that al Imam al Shafi’i was more concerned with establishing principles than with dealing with minor issues and details.

The scholars writing on the subject of the history of Usul al Fiqh are unanimously agreed that the first writer on the subject was al Imam al Shafi’i, and that the first book ever written on the subject was the Risalah51.

In his book, al Bahr al Muhit, al Zarkashi (d 794 AH) devoted a chapter to this, in which he said:

“Al Imam al Shafi’i was the first to write about Usul al Fiqh. He wrote the Risalah, Ahkam al Qur’an (Legal Interpretations of the Qur’an), Ikhtilaf al Hadith (Conflicting Hadith), Ibtal al Istihsan (The Invalidity of Juristic Preference), Jima’ al ‘Ilm (The Congruence of Knowledge), and al Qiyas (Analogical Reasoning)-the book in which he discussed the error of the Mu’tazilah group, and changed his mind about accepting their testimony. Then, other scholars followed him in writing books on al Usul.”

In his commentary on the Risalah, Al Juwayni wrote:

“No one before al Imam al Shafi’i wrote books on the subject of al Usul, or had as much knowledge as he concerning it. It is related that Ibn ‘Abbas mentioned something about the particularization of the general, and that some of the others among the early scholars made pronouncements which suggested they understood these principles. Still, those who came after them said nothing about al Usul, and they contributed nothing to it. We have seen the books of the Tabi’un and the third generation, and have found that none of them wrote books about al Usul.”52


Al Imam al Shafi’i began his book by describing the state of mankind just before the mission of the Prophet. In doing so, he divided them into two groups:

  1. Ahl al Kitab “the People of the Book”; or, the followers of earlier revelation who had altered their scripture and tampered with some of its legal injunctions. Essentially, these people had lapsed into disbelief and then attempted to fuse their falsehood with the Truth which Allah had revealed.
  2. The Mushrikun and Kafirun who worshipped idols instead of Allah.

Then al Imam al Shafi’i went on to say that Allah rescued all mankind by sending the Last of the Prophets, and revealing to him His Book, so that they might be delivered by means of it from the blindness of disbelief into the light of guidance:

Behold, it is a Divine Scripture, sublime. No falsehood can attain to it openly and neither in a stealthy manner; (since it is] bestowed from on high by One who is Truly Wise, Ever to be Praised (41 : 41-42).

Then al Imam al Shafi’i went on to discuss in detail the status of the Qur’an in Islam and its comprehensive statements about what Allah had permitted and prohibited, how man is to worship Allah, the rewards of those who obey Him, the punishments of those who disobey Him, and how He admonished them by telling the stories of those who had gone before.

Then, al Imam al Shafi’i explained that students seeking knowledge of Islam should learn as much of the Qur’an and its sciences as possible; and that when their intentions are pure they may both quote its verses and infer meanings from them.

At the end of his Introduction to the Risalah, al Imam al Shafi’i said: “No problem will ever beset any of the followers of Allah’s religion except that there be guidance in the Book of Allah to indicate the right way. For, Allah, the Blessed and Most High, said:

A Book We send to you, that you may bring forth mankind from darkness to light, by the permission of their Lord to the path of the Almighty, the Praiseworthy (14:1).

He also said:

And We sent down to you the Reminder, that you may make clear to mankind what was sent down to them; and so haply they may reflect (16:46).


And We have sent down to you the Book as an explanation of everything; and as a guidance, and a mercy, and good tidings to the Muslims (16:91).


Likewise, We have revealed to you a spirit of our bidding. You did not know what the Book was, nor the faith; but We made it a light by which We guide whomsoever We will of Our servants. And, verily, you shall be a guide unto a right path, the path of Allah (42:52).

There follows a chapter on al Bayan53 in which the word is defined as a legal term, and then divided into categories in explanation of the ways that the Qur’anic declaration indicates matters of legal significance. There are five such categories:

  1. That which Allah expressed as a specific legal provision which admits of no interpretation other than its literal meaning. This category of al Bayan needs no other explanation than the Qur’an itself.
  2. That which the Qur’an mentions in texts that may be interpreted in several ways; and for which the Sunnah provided an explanation as to exactly which one was intended.
  3. That which was clearly stated to be obligatory; and which the Prophet, upon him be peace, explained in terms of how, why, upon whom, and when applicable and when not.
  4. That which was explained by the Prophet, upon him be peace, but not mentioned in the Qur’an. Allah (SWT) commanded in the Qur’an that the Prophet be obeyed and his rulings accepted. Therefore, what is said on the authority of the Prophet, is said on the authority of Allah.
  5. That which Allah requires His creation to seek through Ijtihad. This is Qiyas. According to al Imam al Shafi’i, Qiyas is a method for reaching a legal decision on the basis of evidence (a precedent) in which a common reason, or an effective cause, is applicable.

Al Imam al Shafi’i then went on to explain these five categories in five separate chapters, giving examples and evidence for each. Thereafter, the Risalah included the following chapters:

  • The General Declaration revealed in the Qur’an is meant to be Comprehensive ‘Amm, but includes the Particular Khass.
  • The Explicit General Declaration of the Qur’an in which the General and the Particular are included.
  • Explicit General Declaration of the Qur’an which appears to be General but is intended to be entirely Particular.
  • The Category of al Bayan in the Qur’an by means of which meaning is clarified by context.
  • The Category of al Bayan in the Qur’an the wording of which indicates the Implicit al Batin meaning rather than the Explicit al Zahir.
  • That, of the Qur’an, which was revealed as General but which the Sunnah specifically indicates is meant to be Particular.

In the above-mentioned chapter; al Imam al Shafi’i explained the validity of the Sunnah as evidence and its status in the religion. For this reason, he then included the following chapters:

  • The duty imposed by Allah in the Qur’an to follow the Sunnan of His Prophet.
  • Allah’s command ordering obedience to the Prophet is both associated with obedience to Him and ordered independently.
  • Matters in which Allah commanded obedience to the Prophet.
  • How Allah made it clear that the Prophet was obliged to follow what was revealed to him and to obey whatever commands Allah gave him; and that Allah will guide any who follow him.

In this chapter, al Imam al Shafi’i affirmed that parts of the Sunnah of the Prophet dealt with and were related to the Qur’an, whilst other parts explained matters concerning which there was no relevant text in the Book. Al Imam al Shafi’i also showed that the Sunnah existed independently of the Qur’an, and quoted evidence in refutation of those who disagreed with him in that matter. Then he said: “I shall explain what I have already said about the Sunnah, (whether) it particularizes the Qur’an or provides additional legislation for matters not mentioned therein; and this will illustrate what I have discussed above, Allah willing. I shall first speak of the Sunnah based on the Book of Allah, by dealing, by means of deductive reasoning, with the subject of the Sunnah in regard to the abrogating al Nasikh and abrogated al Mansukh passages of the Qur’an. Thereafter, I shall mention the Fard-duties specified (in the Qur’an) and the Sunnah in regard to them; the Fard-duties revealed in General terms which the Prophet (PBUH) made Particular through his specifying details relating to how and when; the General texts that were intended to be understood as General, and the General texts that were intended to be understood as Particular; and, finally, the Sunnah of the Prophet (PBUH) for which there is no textual authority from the Book of Allah.”

There follows a chapter entitled, “The Origin of the Abrogating and the Abrogated”; which explains that Allah (SWT) used abrogation to make (the Shari’ah) easier and more flexible. This chapter also makes the point that a verse Ayah of the Qur’an can only be abrogated by another verse of the Qur’an; and that the Sunnah can only be abrogated by the Sunnah.

Then he dealt with the abrogating and the abrogated which are indicated in part by the Qur’an, and in part by the Sunnah.

Thereafter comes mention of the Fard-duty of Salah and the explanation in the Qur’an and the Sunnah concerning those who may be excused from performing it, and those whose Salah is not accepted because of some act of disobedience they may have committed.

Then al Imam al Shafi’i writes of the Abrogating and the Abrogated that are indicated by the Sunnah and al Ijma’;

  • of the Fard-duties which Allah laid down in the text of the Qur’an,
  • of the Fard-duties laid down in the text of the Qur’an which the Prophet (PBUH) also dealt with in the Sunnah.
  • of the Fard-duties laid down in the text of the Qur’an which the Sunnah indicated were meant to be Particular in application,
  • of the Fard-duties in general which are clearly meant to be compulsory and for which the Prophet (PBUH) gave the explanation as to how they were to be performed; like Salah, Hajj, Zakah, the number of wives, women whom one is not permitted to marry, and dietary prohibitions.

In the next chapter he discussed defects in Hadith, and explained that the contradictions between Hadith could be attributed to many reasons. He then went on to explain some of these reasons. For example, a contradiction might appear because one Hadith was abrogated by another, or because mistakes occurred in the narration of the Hadith. He explained the mistakes which might cause contradictions in the Hadith, and many other reasons for such contradictions. Then he dealt with the various types of prohibitions, and explained that some Hadith clarify others.

Al Imam al Shafi’i also included a chapter on knowledge, and explained that there are two types of knowledge. The first is that sort of common knowledge which no sane, mature adult could possibly not know about. All of this knowledge can be found mentioned in the text of the Qur’an, and every Muslim knows all about it because it has been transmitted down from the Prophet (PBUH) to each succeeding generation in turn. There is no dispute concerning the authenticity of this knowledge, and all are agreed that it is binding. Indeed, the nature of this knowledge is such that there can be no mistakes in its transmission or interpretation.

The second type of knowledge is of the details which stem from the obligations, and the specific laws relating to them. These are not mentioned in the text of the Qur’an, and most of them are not mentioned in the text of the Sunnah, apart from single-individual narrations, Ahad.

Thus, al Imam al Shafi’i introduced a new subject, the single- individual narration, Khabr al Wahid. Al Imam al Shafi’i then explained what is meant by this term, and the conditions which determine whether or not a narration is of the single-individual variety. The difference between testimony and reporting, Shahadah and Riwayah, was explained; as were those matters which may be accepted through a single-individual narration, and those for which a Khabr al Wahid alone is not sufficient.

Then al Imam al Shafi’i discussed the authority of the Khabr al Wahid, and whether such reports could be adduced as evidence. His conclusion, supported by very sound arguments, was that indeed they could be used. Thus, al Imam al Shafi’i succeeded in refuting all the misgivings brought up by his opponents on this issue.

The following chapters then follow:

  • On al Ijma’: its definition, and legal authority.
  • On al Qiyas: its meaning and nature, the need for it, the varieties of Qiyas, and who is, and is not, competent to employ it.
  • On Ijtihad: how it is based first on the Qur’an, and then on the Sunnah; what constitutes correct and incorrect Ijtihad.
  • On al Istihsan, Juristic Preference: al Shafi’i was careful to explain that no Muslim is permitted to use al Istihsan in order to contravene the Hadith, nor may he pronounce any legal judgement which is not based on the Qur’an, Sunnah, al Ijma’ or al Qiyas. He also explained the difference between al Qiyas and al Istihsan.
  • On disagreement among the scholars: al Imam al Shafi’i explained that these disagreements are of two types; the type that are prohibited and the type that are not. The types of disagreements which are not allowed are those concerning matters for which Allah has provided clear evidence in the texts of the Qur’an or Sunnah. Those disagreements which are permitted pertain to matters which could be interpreted in several ways and to which each scholar applies his own reasoning. Al Imam al Shafi’i then gave examples of both kinds of disagreements, and mentioned the reasons for each. He also gave examples of issues on which the Sahabah had disagreed, such as ‘Iddah, oaths and inheritance. In this chapter; al Imam al Shafi’i mentioned something of his methodology for assigning preference to the opinions of the Sahabah when they differed.

The Risalah concludes with an explanation of al Shafi’i’s opinion on the “categories of evidence” mentioned above:

“We base our judgements primarily on the Qur’an and the agreed-upon Sunnah concerning which there is no dispute, and say: ‘This is our judgement after studying both the explicit and the implicit meanings of the texts.’ Then, if we have to refer to the Sunnah that is narrated by only a few persons and concerning which there is no agreement, we say: ‘We accept the Hadith as it is, but are aware that there could be some hidden fault in its narrators.’ Then we will refer to at Ijma’ then to al Qiyas. Al Qiyas is weaker than at Ijma’ and it is used only when necessary because it is not lawful to use al Qiyas when there is a narration concerning the matter being dealt with.”

From the writings of al Imam al Shafi’i, we know which sources of Islamic jurisprudence were agreed upon, and which were the cause of disagreement at that time.

The sources which were agreed upon were: The Qur’an and the Sunnah in general.

The sources concerning which there was disagreement included the Sunnah in its entirety, to some, and the Khabr al Wahid narrations (which al Imam al Shafi’i referred to as al Khassah) in particular. But al Imam al Shafi’i’s contribution was that he examined these two issues in their entirety in the Risalah and in his Jim’ al ‘Ilm.

Other matters concerning which there were disagreements included:

  1. Al Ijma’: There were disagreements concerning its validity as evidence; concerning the different types of al Ijma’; whose Ijma’ may be accepted as evidence; matters m which al Ijma’ may be considered as evidence; and how the public may be made aware that there is Ijma’ on any particular matter.
  2. Al Qiyas and al Istihsan: There were disputes concerning the meaning of these terms, their nature, validity as evidence, the possibility and method of using them, and whether the actions of the Sahabah could be considered Qiyas or Istihsan.
  3. There was also open disagreement concerning the significance of the Qur’anic command and prohibition, their meanings and their impact on the rest of the legal, Fiqh judgements. We may notice that in this period, the four Sunni Imams did not use strictly defined terminology such as al Tahrim “Prohibition”, al Ijab “obligation”, etc., as these words were not commonly used in their vocabulary. Rather, this kind of legal terminology appeared later on, as Ibn Qayyim has stated.54
  4. Other sources of Islamic jurisprudence concerning which there are differences were not commonly discussed at the time of the early jurists. For example, such terms as al ‘Urf, al ‘Adah, and al Istishab were not part of their vocabulary.

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s