A Qazi is a religious judge in Islam who works under Sharia law. A Qazi may be appointed by an Imam, Caliph, Sultan, or governor if given the authority. According to Hidaya, a book of Islamic jurisprudence, a Qazi must be a Muslim, adult, free man who has basic knowledge of Islamic law and acts with impartiality and integrity. Additional qualifications include producing decisions in writing, maintaining equality, and having knowledge of principles of justice and rules of interpretation.