Walk into a large masjid in Dubai or London and watch the congregation pray. One man folds his hands below the navel, another on his chest, a third lets his arms hang at his sides. All three are following the Sunnah as understood by one of four great imams: Abu Hanifa (80–150 AH), Malik (93–179 AH), ash-Shafi'i (150–204 AH) and Ahmad ibn Hanbal (164–241 AH). Their schools of law, the madhabs, are not rival religions or sects. They are four carefully built ways of understanding the same Qur'an and Sunnah, and nearly every Sunni Muslim today follows one of them, knowingly or not.
What is a madhab, and why do Muslims need one?
The word madhab means "a way taken" or "a position". In fiqh it means a school of law: a body of rulings, and more importantly the method that produced them, traced back to a founding imam and refined by generations of his students.
The Qur'an and Sunnah are complete, but turning them into detailed practice takes deep skill. A scholar must know which verses are general and which specific, which rulings were later replaced, which hadith are authentic, how the Arabic words were used, what the Companions understood, and how to apply a principle to a new case. Very few people in any generation can do all of that. The Qur'an itself says, "So ask the people of knowledge if you do not know" (Surah An-Nahl 16:43). The madhabs are the answer to that need, preserved in writing and checked by thousands of scholars over twelve centuries.
Who were the four imams of fiqh?
Imam Abu Hanifa (80–150 AH)
Al-Nu'man ibn Thabit was born in Kufa, a city where Ibn Mas'ud and 'Ali had taught. A cloth merchant by trade, he studied for about eighteen years with Hammad ibn Abi Sulayman, whose fiqh came through Ibrahim an-Nakha'i and 'Alqamah from 'Abdullah ibn Mas'ud. He also learned from 'Ata ibn Abi Rabah in Makkah, and many scholars accept that he saw the Companion Anas ibn Malik. He refused to be chief judge for the Abbasid caliph al-Mansur, was imprisoned, and died in Baghdad in 150 AH.
Method: the Qur'an, the Sunnah, the views of the Companions, then qiyas (analogy), istihsan (preferring a stronger evidence over strict analogy) and 'urf (sound custom). He worked with a council of students who debated each question. Works: he wrote little himself; his student Muhammad ash-Shaybani recorded the school in the six books called Zahir al-Riwayah, and Abu Yusuf spread it as chief judge. Followed in: Turkey, the Balkans, Central Asia, Afghanistan, India, parts of the Arab world, and among many Muslims in the West. It is widely regarded as the most followed school. Read his full story in our article on Imam Abu Hanifa.
Imam Malik ibn Anas (93–179 AH)
Malik was born and died in Madinah, the city of the Prophet ﷺ, and left it only for Hajj. He studied with Nafi', the freed slave and student of Ibn 'Umar, with Ibn Shihab az-Zuhri, with Rabi'ah ibn Abi 'Abd al-Rahman, and with Ja'far as-Sadiq. He did not sit to teach until senior scholars agreed he was ready. Out of respect for the Prophet's city, he is reported to have avoided riding inside Madinah. He taught that a divorce given under force does not count; because people applied this to oaths of allegiance taken under force, the governor of Madinah had him flogged.
Method: the Qur'an, the Sunnah, and distinctively the practice of the people of Madinah ('amal ahl al-Madinah), which he saw as a living Sunnah passed down from the Prophet's own city. He also used the views of the Companions, qiyas, public benefit (al-maslahah al-mursalah) and blocking the means to harm (sadd al-dhara'i'). Works: al-Muwatta', one of the earliest surviving books of hadith and fiqh. He is reported to have declined a caliph's wish to impose it on the whole empire, saying the Companions had spread to many lands with knowledge of their own. His school was later recorded in al-Mudawwanah by Sahnun. Followed in: North and West Africa, Sudan, parts of Upper Egypt and the Gulf, and historically al-Andalus.
Imam ash-Shafi'i (150–204 AH)
Muhammad ibn Idris ash-Shafi'i, of the Quraysh tribe, was born in Gaza in the year Abu Hanifa died. Orphaned young, he was raised by his mother in Makkah, memorised the Qur'an as a child, and spent time with the Hudhayl Bedouin to master pure Arabic. He studied with Muslim ibn Khalid az-Zanji and Sufyan ibn 'Uyaynah in Makkah, then went to Madinah to learn from Malik, having memorised the Muwatta'. Later, in Baghdad, he studied Hanafi fiqh with Muhammad ash-Shaybani. He taught in Baghdad, then moved to Egypt in about 199 AH, revised many of his views (his "new" school), and died in Fustat in 204 AH.
Method: the Qur'an, the Sunnah, consensus (ijma') and qiyas, with strict rules for each. He held that an authentic single hadith binds even if local practice differs, and he rejected istihsan as it was used by some. Works: al-Risalah, the first book written on usul al-fiqh, the principles of deriving law, and al-Umm, his large book of fiqh. Followed in: Egypt, Syria, Palestine, Jordan, Yemen, East Africa, Indonesia, Malaysia, Brunei, Sri Lanka, and in India along the Kerala and Konkan coasts.
Imam Ahmad ibn Hanbal (164–241 AH)
Ahmad was born in Baghdad and travelled for hadith to Kufa, Basra, Makkah, Madinah, Syria and Yemen, where he studied with 'Abd al-Razzaq in San'a. Among his teachers were Hushaym ibn Bashir, Sufyan ibn 'Uyaynah, Waki' ibn al-Jarrah and ash-Shafi'i, and he is reported to have first written hadith from Abu Yusuf. He is remembered above all for the Mihnah, the inquisition in which caliphs from al-Ma'mun onwards tried to force scholars to declare the Qur'an created. Ahmad refused and was imprisoned and flogged under al-Mu'tasim before being released; the policy finally ended under al-Mutawakkil. He died in Baghdad in 241 AH, and huge crowds attended his funeral.
Method: the Qur'an, the Sunnah, the fatwas of the Companions, a preference for a narration that is only mildly weak over analogy, and qiyas only when needed. Works: al-Musnad, a vast hadith collection arranged by Companion, with more than twenty-seven thousand narrations in modern numbered editions. His fiqh was gathered from his answers to students, including his sons Salih and 'Abdullah and Abu Dawud, then organised by al-Khallal, and later explained in Ibn Qudamah's al-Mughni. Followed in: Saudi Arabia and Qatar mainly, with followers elsewhere in the Gulf.
How are the four imams linked as teachers and students?
The four imams were not rivals working apart. They form a chain of teachers and students across less than a century.
- Abu Hanifa and Malik. Contemporaries who are reported to have met and discussed fiqh in Madinah.
- Muhammad ash-Shaybani. Abu Hanifa's student, who also studied the Muwatta' with Malik for about three years.
- Ash-Shafi'i. Student of Malik in Madinah and of ash-Shaybani in Baghdad, so he learned both the Madinan and the Kufan traditions from their sources.
- Ahmad. Student of ash-Shafi'i in Baghdad, and a reader of Abu Yusuf's narrations.
So the later imams knew the earlier schools from the inside. When they differed, it was not from ignorance of each other, but from considered disagreement on method.
Why do the four madhabs differ?
The Prophet ﷺ himself approved of honest difference. After the Battle of the Trench he told the Companions not to pray 'Asr until they reached Banu Qurayzah. Some prayed on the way when the time was running out, understanding that he meant "hurry"; others delayed until arrival, taking the words literally. He did not blame either group (Sahih al-Bukhari 946). He also said that when a judge strives and gets it right he has two rewards, and when he strives and errs he has one (Sahih al-Bukhari 7352, Sahih Muslim 1716). The main causes of difference are:
- Meaning of words. Surah Al-Baqarah 2:228 sets a waiting period of three quru' for a divorced woman. The word can mean menstrual periods or the clean periods between them. Hanafis and Hanbalis take it as periods; Malikis and Shafi'is as the clean phases.
- Literal or figurative. Surah An-Nisa' 4:43 and Al-Ma'idah 5:6 mention "touching women" among things that require purification. In the Hanafi school this means intercourse, so simply touching one's wife does not break wudu. Shafi'is hold that skin contact with a non-mahram woman breaks wudu, while Malikis and Hanbalis link it to desire.
- Combining evidence. The Prophet ﷺ said there is no prayer for one who does not recite Al-Fatihah (Sahih al-Bukhari 756). Shafi'is apply this to the follower too. The Hanafi school says the follower stays silent behind the imam, citing Surah Al-A'raf 7:204, "When the Qur'an is recited, listen to it and be silent", and narrations that the imam's recitation counts for the follower.
- Whether a hadith reached them, and how it was judged. Hadith were spread across many cities. A narration well known in one place could be unknown or judged weaker in another.
- Principles of method. Is the practice of Madinah a proof? Is a mursal hadith accepted? Is istihsan valid? Different answers lead to different rulings across hundreds of questions.
What does it mean that a madhab is a system?
A madhab is not a list of opinions you can pick from. It is a connected system: principles of interpretation (usul), a ranked set of opinions within the school, rules for which view is used for fatwa, and centuries of commentary and case law. When a new question appears, such as a modern financial contract or a medical procedure, scholars of the school apply its principles consistently.
Each school also has a structure of texts that students study in stages. In the Hanafi school, a student might begin with Nur al-Idah on worship, move to Mukhtasar al-Quduri, then al-Hidayah, and consult Radd al-Muhtar of Ibn 'Abidin for fatwa. The other schools have similar paths. This is why a madhab gives stable, consistent answers that ordinary believers can trust, and why scholars can tell you exactly where a ruling comes from.
Why follow one madhab, and can you mix them?
Following a qualified scholar's understanding is called taqlid. For someone who has not mastered Arabic, the Qur'an's sciences, hadith criticism and the principles of fiqh, it is the natural way to obey the verse "ask the people of knowledge". It is not blind following of a person instead of the Prophet ﷺ; it is trusting an expert's reading of the Prophet's teaching, as we trust a qualified doctor.
Why one madhab? Because picking whichever view is easiest from each school, called tatabbu' al-rukhas, turns religion into personal desire. Imagine someone who touches a woman and says wudu is fine (Hanafi), then bleeds and says wudu is fine (Shafi'i), and prays with both, a prayer that is invalid in both schools. Scholars such as Ibn 'Abd al-Barr reported agreement that chasing concessions in this way is not allowed.
The Hanafi position is that an ordinary believer should follow one recognised school consistently. At the same time, qualified scholars may, in a real need and with proper conditions, give a fatwa from another school on a specific question. A known example: in the twentieth century, Hanafi scholars in India, led by Mawlana Ashraf 'Ali Thanwi in al-Hilat al-Najizah, adopted the Maliki ruling on a wife whose husband has gone missing, because the strict Hanafi ruling caused severe hardship. That was a scholarly decision for a real need, not individual shopping.
How did the four imams treat each other?
The imams disagreed firmly and respected each other deeply. Ash-Shafi'i, who studied with Malik, is reported to have said that Malik was his teacher and the one from whom he took knowledge, and that people in fiqh are dependants of Abu Hanifa. Ahmad, ash-Shafi'i's student, prayed for his teacher for years after his death, according to reports from his son.
A well-known saying expresses the spirit: "My view is correct but may be wrong, and the other view is wrong but may be correct." It is often attributed to ash-Shafi'i, though its exact source is debated. Scholars of all schools prayed behind each other, and Imam Ahmad is reported to have said, about praying behind an imam who did not renew wudu after cupping (which Ahmad held necessary), that he would not refuse to pray behind scholars such as Malik and Sa'id ibn al-Musayyib.
Difference without division
Mosques in Makkah and Madinah have hosted teachers of all four schools for centuries. A Hanafi may pray behind a Shafi'i imam, and both may sit in the same class. Respect is the inheritance of the imams.
Which other early madhabs did not survive?
There were once more than four. Several great jurists founded schools that were followed for a time but did not last, usually because their students did not record and teach them systematically.
- Al-Awza'i (died 157 AH). The imam of Syria, whose school was followed there and in early al-Andalus before the Maliki school replaced it.
- Sufyan ath-Thawri (died 161 AH). A towering hadith scholar of Kufa whose fiqh had followers for some generations.
- Al-Layth ibn Sa'd (died 175 AH). The imam of Egypt. Ash-Shafi'i is reported to have said he was more learned in fiqh than Malik, but his students did not preserve his school.
- Dawud az-Zahiri (died 270 AH). Founder of the literalist Zahiri school, later championed by Ibn Hazm in al-Andalus.
- Ibn Jarir at-Tabari (died 310 AH). The great historian and Qur'an commentator, whose own school faded after a short time.
The four schools survived because each had dedicated students, written texts, teaching institutions and judges, and each was tested and accepted by the scholars of the Muslim world.
How should an ordinary Muslim follow a madhab?
- Follow the school of your teachers and community. Most people learn their prayer from family and local scholars. If they are Hanafi, learning Hanafi fiqh properly is the simplest path.
- Learn the basics from a reliable book or teacher. Start with purification, salah and fasting in your school, not random clips.
- Ask a qualified local scholar. For real questions in marriage, trade or inheritance, ask someone trained in your madhab.
- Respect other schools. A different way of folding the hands is not an error to correct. Pray behind other imams with an open heart.
- Begin with the Qur'an. Every imam started by reciting and memorising the Qur'an with a teacher.
To understand the hadith side of this story, read our guide to the six books of hadith and the hadith terms explained. Our Islamic reading list suggests books for going further. If you want to start where every imam started, our Qur'an courses teach reading, Tajweed and Hifz with qualified teachers.
Sources
- The Qur'an, Surah An-Nahl (16), verse 43.
- The Qur'an, Surah Al-Baqarah (2), verse 228.
- Sahih al-Bukhari, hadith 946: the Companions' different understanding of praying 'Asr at Banu Qurayzah.
- Sahih al-Bukhari, hadith 7352, and Sahih Muslim, hadith 1716: the judge who strives has two rewards if right and one if wrong.
- Sahih al-Bukhari, hadith 756: there is no prayer for one who does not recite Al-Fatihah.
- Ash-Shafi'i, al-Risalah; Malik, al-Muwatta'; al-Dhahabi, Siyar A'lam al-Nubala'.