# Hanafi school

The Hanafi school or Hanafism is one of the four major schools of Islamic jurisprudence within Sunni Islam. It developed from the teachings of the jurist and theologian Abu Hanifa (c. 699–767 CE), who systemised the use of reasoning (ra'y). Hanafi legal theory primarily derives law from the Quran, the sayings and practices of Muhammad (sunnah), scholarly consensus (ijma) and analogical reasoning (qiyas), but also considers juristic discretion (istihsan) and local customs (urf). It is distinctive in its greater usage of qiyas than other schools.
The school spread throughout the Muslim world under the patronage of various Islamic empires, including the Abbasids and Seljuks. Transoxiana emerged as a centre of classical Hanafi scholarship between the 10th and 12th centuries, which gave rise to the Maturidi school of theology. The Ottoman Empire adopted Hanafism as its official school of law and influenced the legal thought of the school, eventually codifying it as the Mecelle in the 1870s.
Followers of the Hanafi school are called Hanafis, who are estimated to comprise two third of all Muslims. It is the largest Islamic legal school and is predominant in the Indian subcontinent, Turkey, Central Asia and much of the Levant.

## History

The Hanafi school emerged from the legal tradition of Kufa in Iraq, in which its eponym Abu Hanifa (d. 150/767) resided. Iraqi jurists were known for their use of independent reasoning (ra'y) in deriving law. Kufa, alongside Medina and Basra, was a centre of legal activity at the beginning of the second Hijri century. Its prominent jurists included Amir al-Sha'bi, Ibrahim al-Nakha'i and Hammad ibn Abi Sulayman. The opinions of Abu Hanifa and the earlier Kufan jurists closely correspond, particularly those of al-Nakha'i. Abu Hanifa's legal doctrine, as conveyed to his students, was predominantly derived from his own instructors, chiefly Hammad. Abu Hanifa attended Hammad's study circle for approximately 20 years and inherited it upon Hammad's death.

### Formative period

Abu Hanifa and his students were responsible for systemising the use of ra'y, of which Abu Hanifa was its "unrivalled master". According to his contemporary Shu'bah, Abu Hanifa was the "most systematic jurist of his time". His legal thought was distinct for its treatment of hypothetical scenarios, which he held would help prepare for disastrous circumstances. It was also distinct for its method of analogical reasoning (qiyas). Abu Hanifa would identify the normative, underlying principles of the law from the Quran, hadith and practices of Muhammad's companions, and applied these to solve unprecedented legal cases. Qiyas and adherence to analogical consistency were defining characteristics of early Hanafis, who employed juristic discretion (istihsan) to depart from the results of qiyas when deemed appropriate. As qiyas enabled the treatment of multiple legal cases from a single case, it facilitated the systematic compilation of legal literature.
There is no record of legal treatises authored by Abu Hanifa. His teachings were transmitted by his disciples Abu Yusuf (d. 182/798) and Muhammad al-Shaybani (d. 189/804), the last of whom was the most prolific. Later Hanafis termed the corpus of al-Shaybani as the "zahir al-riwaya" and ascribed it an authoritative status. The students of Abu Hanifa established study circles in Baghdad, an emerging hub of cultural activity and the seat of the Abbasid Caliphate. The school won the support of the centralising Abbasid state, which sought to unify the legal system. The Abbasids' preference for appointing Hanafi judges assisted in spreading the school. Abu Yusuf served as a judge in Baghdad; the Abbasid caliph Harun al-Rashid (r. 786–809) later appointed him as the chief judge. By the time of al-Shaybani's death, the school had spread to Egypt and Balkh in Tokharistan.
Ra'y dialectics involved the interlocutors exploring a series of hypothetical legal cases to delineate the limits of legal assumptions. In practice, it led Hanafis to favour widely accepted hadith, particularly those which enshrined general principles that were applicable to other cases. When the widespread collection of hadith led to the circulation of reports that contradicted Hanafi positions, the Hanafis prioritised those that were acted upon by the Iraqi legal tradition. Reports supported by Iraqi juristic practice were deemed more authoritative than those which were not. Abu Yusuf and al-Shaybani separately authored works named Kitab al-Athar (lit. 'Book of Traditions'), which sought to ground Hanafi teachings in the precedent of the early Kufan jurists and the Kufan companions of Muhammad, notably Abd Allah ibn Mas'ud and Ali. Abu Hanifa himself is known to have used hadith; in Abu Yusuf's Ikhtilaf Abi Ḥanifa wa-Ibn Abi Layla, which lists cases where Abu Hanifa differed with his contemporary Ibn Abi Layla, Abu Hanifa is quoted as citing a hadith in around 10% of the cases presented, but cites narrations attributed to Muhammad's companions more often.
In contemporary external sources, members of the nascent school were described as the ashab abi ḥanifa ("companions of Abu Hanifa") and the ashab al-ra'y ("companions of ra'y"). Early Hanafi doctrine was attacked by the traditionists, who accused Hanafis of preferring their ra'y to hadith. The traditionists primarily found objectionable the Hanafi practice of sometimes favouring qiyas over hadith that were not widely transmitted (ahad). The identification of Hanafis with the ashab al-ra'y in contradistinction to the traditionist ashab al-hadīth strengthened during the resurgence of the latter following the Mihna. Al-Shafi'i (d. 150/767), too, critiqued the Hanafis' treatment of hadith and their claim that their positions reflected those of the Kufan companions of Muhammad. He further argued that istihsan was subjective, which later led to classical Hanafi legal theorists articulating it as being completely dependent on the primary sources of law.

### Classical period

During the 9th-century, the Hanafi school transitioned from a "personal school" centered around individual jurists and their study circles to a distinct legal community with a collectively recognised doctrine and authoritative figures. By the end of the century, the school resembled a professional body with a doctrine that was systematically transmitted from teachers to students, maturing into its classical form. Hanafis began to write commentaries on earlier works; until the 12th-century, these were mostly on the works of al-Shaybani. Al-Quduri (d. 428/1036–37)'s legal primer Mukhtasar al-Quduri was the classical school's first work of the mukhtasar genre and the most authoritative after that of al-Shaybani.
Criticism from the traditionists led to the Hanafis grounding their positions in hadith over the 9th-century. Some Hanafis moved towards using the traditionists' method of hadith criticism to justify the school's positions, such as the Egyptian jurist al-Tahawi (d. 321/933). Nonetheless, the classical legal theorists focused on formulating a Hanafi approach to hadith criticism that emphasised a hadith's acceptance by early jurists, with transmitter analysis taking a secondary role.
During the 9th-century, the Hanafi school also emerged as the prevailing school in Transoxiana and Tokharistan. The school was introduced to Transoxiana by the students of Abu Hanifa and al-Shaybani, but became prevalent under the Samanids, during whose rule Hanafi scholars received official favour. The Transoxianan Hanafi tradition was highly influential in defining the doctrine of the later school. Works authored by Transoxianan jurists and accorded a high status in later Hanafi tradition include:
* The jurisprudential work of al-Sarakhsi (d. 483/1090), known as Usul al-Sarakhsi, as well as his legal commentary al-Mabsut.
* The Hidayah of Burhan al-Din al-Marghinani (d. 593/1197), which is considered the most authoritative representation of the early classical school.
* Badaʾiʿ al-Sanaʾiʿ, a large legal commentary by Ala al-Din al-Kasani (d. 587/1191).
The intellectual descendants of al-Sarakhsi and his teacher, Abd al-Aziz ibn Ahmad al-Halwani (d. 448/1056-57), eventually became the primary branch of the Transoxianan tradition. For 300 years after al-Sarakhsi, the Halwani-Sarakhsi branch constituted almost all of the major jurists engaged in rule-formulation (tarjih) within the school, and dominated the process. The process contributed to the stabilisation of the school's laws. The branch also popularised the doctrine of the zahir al-riwaya: that the opinions transmitted from the school's founders command the highest level of authority within the school.
In the 10th-century, the Hanafi theologian Abu Mansur al-Maturidi (d. 333/944) developed a kalam tradition that crystallised into the Maturidi school of theology, which had descended directly from the theological views of the earliest Hanafis. Due to philosophical differences, the Transoxianan Maturidis disagreed with the Mu'tazilite strain of Iraqi Hanafis on several technical points of legal theory, but saw limited success in expunging the Mu'tazilite influence.
The Oghuz Turks who founded the Seljuk Empire became attached to the Transoxianan Hanafi tradition. The Seljuks favoured the eastern Hanafis and appointed them to various official positions in their new territories, encouraging their migration out of Central Asia. During the Seljuk expansion of the 11th and 12th centuries, the Hanafi and Maturidi schools spread westward into Syria, Anatolia and western Persia. In Syria and Iraq, the Central Asian scholars brought with them an increased emphasis on the zahir al-riwaya. Hanafi migration out of Central Asia accelerated during the Mongol invasions, which ravaged the region.

### Mamluk period

During the 13th and 14th centuries, the Mamluk Sultanate saw an influx of Hanafi scholars from Anatolia and Central Asia. Discussions of Islamic logic and kalam in the Mamluk jurisprudential literature reflect the influence of Central Asian scholars.
Criticism of the Hanafi approach to hadith prompted Mamluk Hanafi scholars to treat the subject in more detail. In his legal commentary Fath al-Qadir, the Mamluk jurist Ibn al-Humam (d. 861/1457) engages with the traditionists' approach to hadith criticism, and attempts to navigate the associated legal consequences. His approach to hadith influenced later Egyptian and Syrian Hanafi scholars. This "Egyptian school" of Hanafi hadith criticism referenced hadith from the hadith collections instead of Hanafi legal works, and employed the traditionists' terminology to assess their authenticity.
Mamluk jurists faced difficulties in interpreting the plurality of legal opinions that had accrued in the school. In his work al-Tashih wa-al-tarjih, the Mamluk jurist Ibn Qutlubugha [ar] (d. 879/1474) developed and detailed the process of rule-determination, clarifying the role of precedent and enabling other jurists to engage in the process themselves, and thus determine the applicable legal ruling for a given case. It marked a shift in the material consulted by muftis from the primary literature of the school to its secondary literature, comprising legal commentaries and compendia which contained rulings.

### Ottoman era

The Ottoman Empire adopted the Hanafi school as their official legal school. The Ottomans established an extensive network of madrasas to train jurists, with the most prestigious located in the capital Constantinople. By the 16th-century, the Şeyḫülislâm emerged as the chief imperial religious and judicial authority. The Şeyḫülislâm was appointed by the sultan and presided over the imperial canon, a collection of legal texts that the imperial religious hierarchy was required to consult. Many jurists from Arab provinces of the empire were critical of the imperial canon, partly because of its inclusion of later works which they judged as contradicting the preferred opinions (tarjih) of the school. The sultans influenced the formation of the imperial religious hierarchy by appointing muftis directly and through the Şeyḫülislâm, delineating the range of legal opinions in the Ottoman Hanafi tradition. Members of the imperial religious hierarchy were described as "Rūmīs". Intellectual genealogies (tabaqat) authored by the imperial religious hierarchy aimed to demarcate the institution, situate themselves and their endorsed works in the broader Hanafi tradition and construct an unbroken intellectual chain to Abu Hanifa.
Hanafi law co-existed with the qanun (dynastic law), decrees and edicts promulgated by the sultans. The qanun often reaffirmed religious laws; in other cases, it authorised actions that the jurists opposed, such as torture. The Şeyḫülislâm would sometimes request sultanic edicts to require the imperial religious hierarchy to enforce particular rulings of the school. The Maʿrūḍāt of the Şeyḫülislâm Ebussuud Efendi (d. 982/1574), a collection of fatwas endorsed by Suleiman I, contained sultanic edicts and was frequently referenced in later Hanafi works which considered its opinions binding. Late Hanafis believed that judges could act as deputies of the sultan who could thus regulate, inter alia, the legal opinions judges could reference, such as in the case of inter-school disputes. In the 17th and 18th centuries, Hanafi jurists began to incorporate sultanic edicts into authoritative legal works.
Ibrahim al-Halabi (d. 1549)'s legal manual Multaqa al-Abhur was among the most popular in the empire and was the subject of over 70 commentaries. By the 19th-century, it had become the standard legal textbook. Other popular Ottoman manuals were the Durar al-Hukkam of Molla Hüsrev (d. 885/1479–80) and al-Durr al-Mukhtar of Haskafi. The Radd al-Muhtar of the late Arab-Ottoman jurist Ibn Abidin (d. 1252/1836) is considered an authoritative and representative work of the late Hanafi tradition. It lists most opinions within the school and their level of authoritativeness, incorporating most primary Hanafi sources produced until its writing. It employs legal devices such as necessity (darura) to depart from the canonical zahir al-riwaya where necessary to ensure the continued relevancy of the school, and references sultanic edicts to revise the school's opinions.
Between 1869 and 1877, the Ottomans promulgated the Mecelle, a codification of Hanafi jurisprudence. The Mecelle was drafted by a committee led by the jurist Ahmed Cevdet Pasha, who had successfully argued against the implementation of the Napoleonic Code. It drew from the Hanafi literature on legal maxims (qawaʿid fiqhiyya) and to a great degree favoured the opinions of the late Hanafi tradition. Many of its articles were fully or partially derived from al-Halabi's Multaqa al-Abhur. However, the Mecelle also marked the state's assumption of control over jurisprudence, which had previously been the purview of the decentralized juristic community.

### Indian subcontinent

The Hanafi school spread to India from Transoxiana and eastern Persia. To consolidate control over his realm, the Mughal emperor Aurangzeb (r. 1658–1707) ordered the compilation of Hanafi fatwas. Completed between 1664 and 1672, the resulting al-Fatawa l-ʿAlamgiriyya selected legal opinions from earlier Hanafi legal works and is modelled after the Hidayah of al-Marghinani.
During the colonization of India, the East India Company sought to create a "complete digest of Hindu and Mussulman law" to eliminate legal pluralism. The resulting Anglo-Muhammadan law was based in part on a translation of al-Marghinani's Hidayah, which was chosen for its brevity and its belonging to the Hanafi school, which most Indian Muslims followed. Consequently, the Hidayah was effectively codified and severed from the Hanafi commentarial tradition under which it was traditionally interpreted.
In the 19th-century, the Hanafi Deobandi movement emerged in India. The Deobandis' legal views include strict adherence (taqlid) to a legal school in contradistinction to the Ahl-i Hadith movement, and emphasise the importance of hadith. The Deobandi acceptance of Ibn al-Humam's approach to hadith criticism culminated in the I'la al-Sunan of Deobandi scholar Zafar Ahmad Usmani (d. 1974), a work that attempts to justify Hanafi positions using hadith.

### Contemporary era

Today, the Hanafi school is the largest Islamic school of law, constituting approximately one-third of all Muslims. It is the predominant school in the former Ottoman territories, including Turkey and much of the Levant. It is also predominant among Muslims in Central Asia, the Indian subcontinent, China, the Caucasus and the Balkans. In Pakistan, it is estimated that 75% of Muslims subscribe to the Hanafi Deobandi and Barelwi movements.
The Ottoman Mecelle was repealed by most post-Ottoman states over the first half of the 20th-century. Parts remained in force in Jordan and Israel until the 1970s. Where it is dominant, the Hanafi school is followed in religious observance and, in some regions, continues to govern Muslim family law.

## Legal theory

The legal theory (usul al-fiqh) of the Hanafi school recognises the following sources of law, listed in order of epistemic authority: the Quran, the practices and sayings of Muhammad (sunnah) as documented in the hadith, consensus of opinion (ijma), qiyas, istihsan and local customs (urf). Texts with equal epistemic authority may modify each other; if they are of differing levels, the text with the weaker epistemic authority is rejected in favour of the stronger one.

### Quran

The Quran is the primary source of Hanafi law. In Hanafi legal theory, it is considered acceptable to adduce non-canonical Quranic readings related by the companions of Muhammad as legal evidence, but they are not treated as part of the Quranic text. For example, classical Hanafi jurists are known to have cited the non-Uthmanic reading of Ibn Mas'ud but treated it akin to an exegetical gloss.

### Hadith

The Hanafis categorise hadith as mass-transmitted (mutawatir), famous (mashhur) or solitary (ahad) depending on the nature of their chain of transmission (isnad):
* A mutawatir hadith is transmitted by such a large number of people on each level of its isnad that it is impossible for it to have been forged. It imparts epistemically certain knowledge about the sunnah.
* A mashhur hadith is transmitted by a limited number of people at the first level of its isnad but was widely acted upon by jurists, beginning with their first generations. It imparts epistemically near-certain knowledge about the sunnah.
* An ahad hadith, also known as a "singular report" (khabar al-wahid), is one which is neither mutawatir nor mashur.
Only mutawatir and mashhur hadith may abrogate a Quranic verse, whether by replacing, qualifying or restricting its understanding. An ahad hadith cannot be adduced in legal discussions of "great importance" as Hanafis assume that God would have ensured the reliable transmission of critical religious knowledge; nor can it be used if its early transmitters did not act upon it, as Hanafis assume that their inaction indicates that it is not part of the sunnah.

### Ijma

Ijma refers to the consensus of opinion. Ijma may be explicit, with all mujtahids agreeing verbally or through actions, or tacit, where some express an opinion while others remain silent. In the Hanafi view, tacit ijma can only establish a concession (rukhsah) rather than a strict rule (azimah). The Hanafis believe that the companions of Muhammad reached ijma on some matters, and some Hanafis regard agreement between Abu Bakr and Umar, the first two Rashidun caliphs, as being ijma.

### Qiyas

Qiyas, also referred to analogical reasoning, involves extending a ruling on an original case (asl) to a subsidiary case ('far) where both cases share an effective cause ('illah). For example, because of the prohibition of usury, it is forbidden to exchange wheat and other commodities for each other unless the transaction is immediate and the amount of both goods are equal. Hanafis extend this prohibition to apples through qiyas, as they identify the underlying 'illah as the exchange of a measurable commodity, and apples are measurable.
Compared to the other Sunni and Shi'ite schools of law, Hanafis use qiyas more extensively and grant it greater authority. However, it is deemed a last resort only to be used when no ruling can be derived from the Quran, sunnah and ijma. Hanafis view qiyas as a means of revealing pre-existing implicit rulings within the law rather than as a source of new rulings. Because the law is viewed as coherent and internally consistent, a valid qiyas must accord with its internal rationality.
If a ruling derived from qiyas conflicts with that from an ahad hadith, the Hanafis disagree on which takes precedence. One group argues that the ahad hadith always takes precedence, while a second group, led by Isa ibn Aban (d. 221/836), opine that it only takes precedence if transmitted by a companion of Muhammad known to be a jurist. In general, the early classical school always followed hadith transmitted by jurist-companions regardless of its correspondence with qiyas, but followed hadith transmitted by non-jurist companions only if it corresponded with a possible qiyas, and thus accorded with the internal rationale of the law. By the Ottoman period, however, the distinction had become less popular and non-jurist companions were largely treated the same as jurist companions.
The Hanafis require the original case to not directly state the 'illah. The 'illah must be deduced by other means. If the 'illah is stated, then the ruling is applied to other cases via the "indication of the text" (dalalat al-nass), not qiyas. Dalalat al-nass is an exercise in linguistic interpretation rather than analogical reasoning.

### Istihsan

Istihsan refers to juristic discretion. The Hanafi jurist al-Sarakhsi (d. 483/1090) describes it as a means through which a jurist can depart from a ruling derived through qiyas to ameliorate hardship, where the new ruling is typically supported by a superior proof, such as the Quran, sunnah, necessity (darurah) or an alternative qiyas. For example, by way of necessity, the Hanafi jurists allow a son to buy food or medicine for his ill father from the father's property without his prior permission. Hanafi istihsan based on necessity is, however, less broad than Maliki istihsan based on public welfare (maslaha).
Istihsan emerged out of concerns among Hanafis that unrestrained qiyas could lead to results that were absurd or contradicted the sunnah. The earliest Hanafis, including Abu Hanifa and al-Shaybani, more frequently used istihsan justified by subjective and pragmatic reasoning rather than on evidential grounds. Their use of istihsan sought to change the scope or outcome of a ruling due to its potential effects. More often than not, they deployed istihsan in a way that cannot be considered as ameliorating hardship, such as establishing the liability of a group of thieves involved in theft even if only one of them carried the stolen goods. Subjective istihsan declined due to attacks from al-Shafi'i, and Hanafi legal theorists would systemise it into the form eventually espoused by al-Sarakhsi, attempting to incorporate elements of subjectivity into the definition of necessity.

### Urf

Urf refers to customary practices. The Hanafis consider it as an ancillary source of law that is subordinate to the primary sources of law. Urf is divided into two types: general (al-urf al-'amm) and special (al-urf al-khass). A general urf refers to a customary practice that is widely accepted among a people regardless of the time period. As part of istihsan, the Hanafis permit favouring general urf over a ruling derived through qiyas. A special urf is more local and is upheld by a particular location or profession. Most Hanafis agree that special urf cannot qualify the general meaning of a textual evidence (nass), and that a ruling derived from qiyas takes precedence over special urf, although there is some disagreement on this. Ali Bardakoğlu suggests that the emphasis given to urf in Hanafi legal theory can partly explain the spread of the school among disparate non-Arab groups.