when there was a legal dispute about family or financial matters, it would be handled in a court headed by a "qadi" (judge). these judges also had a legal education, and they were appointed to their post by the ruler. in simple cases, qadis would pronounce a verdict based on their own knowledge of sharia. in more difficult cases, they would express the details of the case in general terms and ask a mufti for his legal opinion.