Maḏāhib (maḏhab singular) are Sharīʿa doctrinal schools. In the 7th century, Muslim juristic knowledge started as study circles (halaqas) in which a pious Muslim scholar – surrounded by people – would debate religious issues and teach interested students. Without an ecclesiastical hierarchy, there was no institutional monopoly over divine truth or divine intent by any scholar. This environment fostered and actually encouraged different interpretations of the law. The knowledge and production of legal doctrine began in these circles that gave birth to the Maḏāhib (Sharīʿa doctrinal schools).
This legal pluralism provided flexibility and the ability by design to accommodate different societies and regions. It is believed that dozens or even hundreds of different scholars established their own doctrinal schools or schools of law with students and followers. By the 11th or 12th century, these schools went through a process of consolidation and/or extinction due to objective political, social, economic, and intellectual factors which led to only four surviving schools in Sunni law: Ḥanafī, Shāfi’ī, Mālikī, and Ḥanbalī.
In most intellectual centers around Muslim lands, these doctrinal schools thrived. It was not unusual that you would have a Ḥanafī scholar teaching while another Shāfi’ī scholar is teaching another halaqa at the same mosque. The Ottoman Empire adopted the Ḥanafī school as the Empire’s doctrinal school. For this reason, it became well-entrenched in Muslim lands. But that did not eliminate the other schools from thriving and taking root all over the Muslim world.
The Arab Persian Gulf countries follow the Ḥanbalī School of Law; North Africa, such as Morocco, Tunisia, and Algeria, follow the Mālikī School of Law; Sunni Muslims in Turkey, Iraq, Egypt, Syria, India, Pakistan, and Afghanistan as well as Central Asia tend to follow the Ḥanafī School of Law. Palestine, East Africa, Indonesia, and Southeast Asia predominantly follow the Shāfi’ī School of Law.
The schools do have differences with respect to Uṣūl al-Fiqh and different fiqh rulings on numerous matters. In the area of inheritance, with the exception of whether a paternal grandfather would block siblings, and the differences in the inheritance distribution in the special cases, the Islamic inheritance rules according to the Ḥanbalī, Ḥanafī, Mālikī, and Shāfi’ī maḏāhib (schools) are by and large the same.
Where the survivors are siblings and a paternal grandfather, the siblings and the paternal grandfather will share together according to the Ḥanbalī, Mālikī, and Shāfi’ī schools. Unlike the Ḥanbalī, Mālikī, and Shāfi’ī schools, in the Ḥanafī school, the paternal grandfather would block siblings from inheritance. Similarly, the Ḥanafī, Ḥanbalī, Mālikī, and Shāf’ī schools differ with respect to inheritance distribution in certain rare special cases.