Before the 11th century CE, anyone who possessed scholarly recognition as an Islamic jurist could issue fatwas. Starting around that time, however, the public office of mufti began to appear alongside the private issuing of fatwas. In Khurasan, the rulers appointed a head of the local ulama, called "shaykh al-Islam", who also functioned as the chief mufti. The Mamluks appointed four muftis, one for each of the four Sunni madhhabs, to the appeals courts of provincial capitals. The Ottomans organized muftis into a hierarchical bureaucracy with a chief mufti of the empire called "shaykh al-islam" at the top. The Ottoman "shaykh al-Islam" (Turkish: "şeyhülislam"), was among the most powerful state officials. Scribes reviewed queries directed to Ottoman muftis and rewrote them to facilitate issuing of fatwas. In Mughal India and Safavid Iran the chief mufti had the title of "sadr".