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).
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 Hanafi school emerged from the legal tradition of Kufa in Iraq, in which its eponym Abu Hanifa (d. 150/767) resided.
Its prominent jurists included Amir al-Sha'bi, Ibrahim al-Nakha'i and Hammad ibn Abi Sulayman.
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.
[14] The students of Abu Hanifa established study circles in Baghdad, an emerging hub of cultural activity and the seat of the Abbasid Caliphate.
[17] In practice, it led Hanafis to favour widely accepted hadith, particularly those which enshrined general principles that were applicable to other cases.
[23] The traditionists primarily found objectionable the Hanafi practice of sometimes favouring qiyas over hadith that were not widely transmitted (ahad).
[25] 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.
[27] 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.
[31] 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).
[34] 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.
For 300 years after al-Sarakhsi, the Halwani-Sarakhsi branch constituted almost all of the major jurists engaged in rule-formulation[c] (tarjih) within the school, and dominated the process.
The Seljuks favoured the eastern Hanafis and appointed them to various official positions in their new territories, encouraging their migration out of Central Asia.
[46] During the Seljuk expansion of the 11th and 12th centuries, the Hanafi and Maturidi schools spread westward into Syria, Anatolia and western Persia.
Discussions of Islamic logic and kalam in the Mamluk jurisprudential literature reflect the influence of Central Asian scholars.
[58] 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.
[59] 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.
[63] The Şeyḫülislâm would sometimes request sultanic edicts to require the imperial religious hierarchy to enforce particular rulings of the school.
[64] 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.
[72] The Mecelle was drafted by a committee led by the jurist Ahmed Cevdet Pasha,[72] who had successfully argued against the implementation of the Napoleonic Code.
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.
[83] Where it is dominant, the Hanafi school is followed in religious observance and, in some regions, continues to govern Muslim family law.
[82] 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).
[2] 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.
[95] Compared to the other Sunni and Shi'ite schools of law, Hanafis use qiyas more extensively and grant it greater authority.
[105] The earliest Hanafis, including Abu Hanifa and al-Shaybani, more frequently used istihsan justified by subjective and pragmatic reasoning rather than on evidential grounds.
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.
[108] 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.