section_path: History
section_name: History
paragraph_text: History
  
  The term ' qāḍī ' was in use from the time of Muhammad during the early history of Islam, and remained the term used for judges throughout Islamic history and the period of the caliphates. While the mufti and fuqaha played the role in elucidation of the principles of Islamic jurisprudence (Uṣūl al-Fiqh) and the Islamic law (sharīʿa), the qadi remained the key person ensuring the establishment of justice on the basis of these very laws and rules. Thus, the qadi was chosen from amongst those who had mastered the sciences of jurisprudence and law. The office of qadi continued to be a very important one in every principality of the caliphates and sultanates of the various Muslim empires over the centuries. The rulers appointed a qadi in every region, town, and village for judicial and administrative control, and in order to establish peace and justice over the dominions they controlled. Although the primary responsibility of a qadi was judicial, he was generally charged with certain nonjudicial responsibilities as well, such as the administration of religious endowments (wāqf), the legitimization of the accession or deposition of a ruler, the execution of wills, the accreditation of witnesses, guardianship over orphans and others in need of protection, and supervision of the enforcement of public morals (ḥisbah).
  
  The Abbasid caliphs created the office of chief qadi (qāḍī al-quḍāh or qāḍī al-quḍāt), whose holder acted primarily as adviser to the caliph in the appointment and dismissal of qadis. Among the most famous of the early judges appointed to the role of chief qadi was Abu Yusuf, a disciple of the early Muslim scholar and jurist Abu Hanifa an-Nu'man, founder of the Hanafi school of Islamic jurisprudence. Later Islamic states generally retained this office, while granting to its holder the authority to issue appointments and dismissals in his own name. The Mamluk Sultanate, which ruled Egypt and Syria from 1250 to 1516 CE, introduced the practice of appointing four chief qadis, one for each of the Sunni schools of Islamic jurisprudence (madhhab).