A qadi presides over a court applying Islamic law, sharia, historically the primary and often sole judicial authority across much of the Muslim world for matters spanning personal status, contracts, criminal law and property disputes, a role combining functions a modern legal system would divide among several distinct judicial specialties. A qadi's rulings traditionally drew on the accumulated legal reasoning of a recognized school of Islamic jurisprudence together with the specific facts and testimony presented in a given case, a body of precedent and interpretive method, fiqh, that developed over centuries of scholarly work distinct from, though drawing upon, the foundational sources of the Quran and hadith themselves.
Historically, a qadi's appointment and jurisdiction derived from the ruling authority of the state, caliph, sultan or local governor, a relationship that gave the office both real independence in applying established legal doctrine to individual cases and, at times, real vulnerability to political pressure or removal by rulers dissatisfied with a particular ruling, a tension between judicial and political authority that Islamic legal history records repeatedly across different periods and regions.