Please note that the content of this book primarily consists of articles available from Wikipedia or other free sources online. Qadi is a judge ruling in accordance with the sharia, Islamic religious law. Because Islam makes no distinction between religious and secular domains, qadis traditionally have jurisdiction over all legal matters involving Muslims. The judgment of a qadi must be based on ijmah, the prevailing consensus of the ulema, Islamic scholars. The term qadi was in use right from the time of the Prophet Muhammad, and remained the term used for judges throughout Islamic history and the period of the caliphates. While the muftis and fuqaha played the role in elucidation of the principles of jurisprudence and the laws, the qadi remained the key person to ensure the establishment of justice on the basis of these very laws and rules.