The Central Judiciary It was in the days of Mahdi that the institution of the chief judge (Qadiu’I-Qudat) came into existence. While at Medina the Prophet (PBUH) himself acted as the chief judge, and had also appointed Qazis for the various provinces of Arab. Later, the Caliph appointed Qazi who worked independent and had neither subordinate under them nor were they under any superior Qazis. Mahdi appointed Abu Yusuf, the most illustrious student of Imam Abu Hanifah, as the Qazi of Qazis. So far, the provincial Qazis were appointed by the Governors of the respective provinces or directly by the Caliph. Henceforward, the chief judge appointed his deputies (na’ibs) in the province. Abu Yusuf served as the chief judge under Mahdi and his two sons and died in the year 798 A D.