Picture a busy cloth shop in the market of Kufa, around the year 120 AH. The owner is a tall, well-dressed man with a calm voice, known for never cheating a customer. In the afternoon he closes the shop and walks to the mosque, where dozens of students are waiting for him. This is Imam Abu Hanifa, al-Nu'man ibn Thabit, born in Kufa in 80 AH and died in Baghdad in 150 AH. He is the founder of the Hanafi madhab and the earliest of the four great imams of fiqh.
When and where was Imam Abu Hanifa born?
Imam Abu Hanifa was born in Kufa, in Iraq, in 80 AH (around 699 CE), during the rule of the Umayyad caliph 'Abd al-Malik ibn Marwan. Most historians accept 80 AH. His name was al-Nu'man, his father was Thabit, and his grandfather was Zuta. The family was of Persian origin; reports differ on whether they came from Kabul, Babil or elsewhere. "Abu Hanifa" is a kunyah, a respectful name of the "father of" type, and later Hanafis gave him the title al-Imam al-A'zam, "the greatest imam".
A report from his grandson Isma'il ibn Hammad says that his father Thabit was taken as a child to 'Ali ibn Abi Talib, who prayed for blessing on him and his descendants. The family traded in khazz, a fine cloth made of silk and wool, and Abu Hanifa grew up in the market. He traded all his life, so he never needed a ruler's salary, which mattered greatly later.
Why Kufa mattered
Kufa was founded as a garrison city in the time of the caliph 'Umar ibn al-Khattab, around 17 AH, and many Companions settled there. 'Umar sent 'Abdullah ibn Mas'ud, one of the most learned Companions in the Qur'an and in fiqh, to teach its people. He trained a generation of students there. In 36 AH 'Ali ibn Abi Talib made Kufa his capital, adding his own judgements and teaching.
By Abu Hanifa's youth, Kufa was full of jurists, narrators, sects and debate. That mix shaped him: a deep tradition from Ibn Mas'ud and 'Ali, and a habit of careful reasoning.
Who were Imam Abu Hanifa's teachers?
As a young man Abu Hanifa first studied kalam, the defence of belief through argument, and he debated sects in Kufa and Basra. Reports say he then turned to fiqh, seeing that people needed answers about prayer, marriage and trade more than debates.
Hammad ibn Abi Sulayman
His main teacher was Hammad ibn Abi Sulayman (died 120 AH), the leading jurist of Kufa. Abu Hanifa stayed with him for about eighteen years, until Hammad's death. When Hammad died, the students asked Abu Hanifa to take over the circle, and he did.
The importance of Hammad is the chain behind him. Hammad learned from Ibrahim an-Nakha'i (died 96 AH), the great jurist of the Tabi'in. Ibrahim learned from 'Alqamah ibn Qays and al-Aswad ibn Yazid, who were students of 'Abdullah ibn Mas'ud. Ibn Mas'ud learned directly from the Prophet ﷺ. So the core of Hanafi fiqh is a living tradition passed from teacher to student back to one of the closest Companions, mixed with what came from 'Ali and the other Companions in Kufa.
Other teachers and the report about Anas
He also performed Hajj many times and studied in Makkah with 'Ata ibn Abi Rabah, the jurist of Makkah. He narrated from Nafi', the freed slave and student of Ibn 'Umar, from 'Amir ash-Sha'bi of Kufa, and he is reported to have learned from Ja'far as-Sadiq in Madinah.
Did he see a Companion? Several reports, including one recorded by Ibn Sa'd, say he saw Anas ibn Malik, the Prophet's servant, who lived in Basra until about 93 AH. Many scholars, among them al-Dhahabi and Ibn Hajar, accepted this, which makes him one of the Tabi'in, the generation that met the Companions. Reports that he narrated hadith from Companions are regarded as weak by most experts. The honest summary is: he probably saw Anas, but he took his knowledge from the Tabi'in.
How did Imam Abu Hanifa derive rulings?
Abu Hanifa is famous for a clear, ordered method. A statement reported from him in several early sources, given here in meaning, says: he takes first from the Book of Allah; if he does not find the answer there, from the Sunnah of the Messenger of Allah ﷺ; if he does not find it in either, from the sayings of the Companions, choosing among them but not going outside their views. When the matter reaches the Tabi'in, such as Ibrahim an-Nakha'i, ash-Sha'bi and 'Ata, he says they were men who made ijtihad, so he makes ijtihad as they did.
- The Qur'an. The first source. Hanafi scholars give great weight to the general wording of a verse and are careful about restricting it with a single narration.
- The Sunnah. Authentic hadith are binding. Hanafis also accept the mursal hadith of trusted Tabi'in, where a link to the Companion is not named.
- The Companions. Where Companions agreed, that is binding. Where they differed, he chose among their views and did not invent a new one.
- Qiyas. Analogy: applying the reason behind a known ruling to a new case with the same reason.
- Istihsan. Preferring a stronger evidence, or a fairer result, over a strict analogy. For example, ordering something to be made (istisna') is allowed by istihsan because people always practised it, though analogy forbids selling what does not yet exist.
- 'Urf. Sound local custom, used to understand contracts, words and agreements, as long as it does not contradict a text.
Two features made his school distinctive. First, he worked with a council of students rather than alone. A question was raised and the students argued it with evidence, sometimes for days, before a conclusion was written down. Reports describe a group of around forty, including Abu Yusuf, Zufar and Dawud at-Ta'i. This is why Hanafi fiqh often records the differing opinions of Abu Hanifa and his students side by side.
Second, he answered questions before they happened. Opponents mocked his "what if?", but it produced the rulings a growing empire needed.
What was Imam Abu Hanifa's character like?
The sources describe him as tall, well dressed and fragrant, a man of few words. Three qualities stand out.
Worship at night
Many reports speak of his long night prayer and his recitation of the Qur'an. Some say he prayed Fajr with the wudu of 'Isha for decades; later historians repeat this, though some numbers in such reports may be exaggerated in the telling. What is clear is that people who lived near him knew him as a man who stood in prayer at night and wept in fear of Allah.
Honesty in trade
A famous report says he once sent his partner, Hafs ibn 'Abd al-Rahman, goods to sell and told him that one garment had a defect that must be shown to the buyer. Hafs forgot and sold it without mentioning the defect, and could not find the buyer afterwards. Abu Hanifa gave away the whole price of that sale in charity. Another story tells of a woman who brought a silk garment to sell at a low price; he told her it was worth far more and paid her its true value. For him, the market was part of his religion.
Generosity
He used his wealth to support students. The best-known case is Abu Yusuf, whose mother wanted him to leave the circle and earn a living; Abu Hanifa quietly provided for the family so he could keep studying. He was also known for not speaking ill of those who attacked him.
Why was Imam Abu Hanifa imprisoned, and how did he die?
Abu Hanifa lived through the end of the Umayyads and the start of the Abbasids, and both offered him office. Under the Umayyads, the governor of Iraq, Yazid ibn 'Umar ibn Hubayrah, is reported to have had him flogged for refusing a post. Later, the Abbasid caliph Abu Ja'far al-Mansur, who had built his new capital Baghdad, asked him to become chief judge. Abu Hanifa again refused, saying he was not fit for it. Historians point to his fear of judging unjustly under pressure, and to politics: he was suspected of sympathy for revolts by members of the Prophet's family against the Abbasids.
Al-Mansur had him imprisoned in Baghdad. Reports say he was beaten in prison. He died in 150 AH (767 CE), most reports say in Rajab or Sha'ban, either in prison or shortly after release. The crowds at his funeral were so large that the prayer is reported to have been repeated several times. He was buried in the district of Baghdad now called al-A'zamiyyah, named after him, where his mosque still stands.
A year of handover
Historians have long noticed that Imam ash-Shafi'i was born in the same year, 150 AH, that Abu Hanifa died. The tradition of the great imams did not stop: it passed on.
Who were Imam Abu Hanifa's main students?
A school of fiqh survives through its students. Abu Hanifa had hundreds, but four are central to the madhab.
Abu Yusuf (113–182 AH)
Ya'qub ibn Ibrahim al-Ansari was his closest student and a strong hadith scholar. Under the caliph Harun al-Rashid he became chief judge, the first person to hold that title. He appointed judges across the empire, which carried Hanafi fiqh into the courts everywhere. His Kitab al-Kharaj, on taxation and public finance, was written for Harun al-Rashid and still survives.
Muhammad ibn al-Hasan ash-Shaybani (about 131–189 AH)
He studied with Abu Hanifa as a young man, then with Abu Yusuf, and also spent around three years in Madinah with Imam Malik, narrating the Muwatta from him. He is the great writer of the madhab: most of what we know of Abu Hanifa's fiqh comes through his books. Imam ash-Shafi'i studied with him in Baghdad and praised his learning.
Zufar ibn al-Hudhayl (110–158 AH)
Known for his precision in qiyas, Zufar was one of the most senior members of the council and served as judge in Basra. Hanafi books still record his views, and on a few questions the later school follows his opinion.
Al-Hasan ibn Ziyad (died 204 AH)
Al-Hasan ibn Ziyad al-Lu'lu'i of Kufa, also a judge, narrated many of Abu Hanifa's opinions, though his narrations rank below Muhammad's main books.
How was the Hanafi madhab written down and spread?
Abu Hanifa taught mostly through discussion, and very little survives that he wrote himself. The short creed al-Fiqh al-Akbar is attributed to him, though scholars discuss how much of the present text is his. Collections of his hadith, known as Musnad Abi Hanifa, were gathered by later scholars, and Kitab al-Athar preserves narrations through him by Abu Yusuf and Muhammad.
The fiqh itself was set down by Muhammad ash-Shaybani in six books known as Zahir al-Riwayah, "the manifest narration", because they were narrated widely and reliably:
- Al-Asl (also called al-Mabsut), the largest.
- Al-Jami' al-Saghir and al-Jami' al-Kabir.
- Al-Siyar al-Saghir and al-Siyar al-Kabir, on international relations and war.
- Al-Ziyadat, additional cases.
Al-Hakim al-Shahid combined them in al-Kafi, which al-Sarakhsi explained in his huge al-Mabsut, much of it dictated from prison. Teaching texts followed: Mukhtasar al-Quduri, al-Hidayah by al-Marghinani, Kanz al-Daqa'iq by an-Nasafi, and much later Radd al-Muhtar by Ibn 'Abidin, still a main reference for fatwa today.
The madhab spread first through the Abbasid courts, thanks to Abu Yusuf. It became dominant in Central Asia, in cities like Bukhara and Samarqand, which produced many of its greatest scholars. The Seljuqs and later the Ottomans made it the official school of their courts. In India it was carried by scholars and rulers for centuries, and under the Mughal emperor Aurangzeb a large collection of Hanafi rulings, al-Fatawa al-Hindiyyah (also called Fatawa 'Alamgiri), was compiled. Today the Hanafi school is followed across Turkey, the Balkans, Central Asia, Afghanistan, India, parts of the Arab world and by many Muslims in the West, and it is widely regarded as the school with the largest number of followers.
What did the other imams say about Imam Abu Hanifa?
The other great imams, who sometimes disagreed with him strongly, still recognised his rank. The best-known statement is from Imam ash-Shafi'i, reported in several sources: in meaning, that people in fiqh are all dependants of Abu Hanifa. Since ash-Shafi'i learned Hanafi fiqh from Muhammad ash-Shaybani, he knew it from the inside.
Imam Malik was asked about him and is reported to have described a man so strong in argument that, if he claimed a pillar of the mosque was gold, he could argue for it. His student 'Abdullah ibn al-Mubarak, a great hadith scholar, praised his fiqh and worship.
Some early hadith scholars criticised him for relying on reasoning. Later scholars, including those of other schools, generally explained this as rivalry between cities and a misunderstanding of his method.
Did Imam Abu Hanifa ignore hadith?
This is the most common misconception, and it is not true. Because his school was called ahl al-ra'y, "the people of reasoned opinion", some assume he put his opinion above the Sunnah. His own stated method puts the Sunnah directly after the Qur'an, and the books of the school are full of hadith and reports of the Companions.
What is true is that he was strict about which narrations he accepted, because forged hadith circulated among Kufa's sects. He weighed single narrations against the Qur'an and the known practice of the Companions. This is caution, not neglect.
In fact, the Hanafi school often leaves analogy because of a hadith. A clear example: if a fasting person eats or drinks by forgetting, analogy would say the fast is broken, because food entered the stomach. But the Prophet ﷺ said that whoever forgets and eats or drinks should complete the fast, for Allah fed him and gave him drink. Abu Hanifa followed the hadith, and is reported to have said that without it he would have ruled the fast must be made up. Another example: Hanafis say that an adult laughing out loud (qahqahah) in a salah with ruku' and sajdah breaks wudu as well as the salah, based on a mursal report, even though analogy points the other way.
- "He only knew a few hadith." Not so. Kitab al-Athar and the Musnad collections contain many narrations through him, and his students Abu Yusuf and Muhammad were hadith scholars in their own right.
- "Hanafis follow a man, not the Prophet ﷺ." Following a madhab means following a qualified scholar's understanding of the Qur'an and Sunnah. It is a way of following the Prophet ﷺ, not an alternative to him.
To understand Abu Hanifa's world better, read our guide to the four imams and why there are madhabs, and our explainer on hadith terms such as mursal and sahih. For the books that later became the main hadith references, see the six books of hadith.
Abu Hanifa's legacy began with the Qur'an, learned and recited carefully. If you want to build that foundation for yourself or your children, browse our Qur'an courses, or start with a free sheet from the Jamia Hafs Library.
Sources
- Al-Khatib al-Baghdadi, Tarikh Baghdad: the biography of Abu Hanifa al-Nu'man ibn Thabit.
- Al-Dhahabi, Siyar A'lam al-Nubala' and Manaqib al-Imam Abi Hanifa wa Sahibayh.
- Sahih al-Bukhari, hadith 1933: whoever forgets while fasting and eats or drinks should complete the fast.
- Muhammad ibn al-Hasan ash-Shaybani, the Zahir al-Riwayah books (al-Asl, al-Jami' al-Saghir, al-Jami' al-Kabir, al-Siyar, al-Ziyadat).
- Ibn 'Abidin, Radd al-Muhtar 'ala al-Durr al-Mukhtar.