 On July 25 Napoleon set up a diwan made up of nine al @-@ Azhar sheikhs tasked with governing Cairo , the first body of Egyptians to hold official powers since the beginning of the Ottoman occupation . This practice of forming councils among the ulema of a city , first instituted in Alexandria , was put in place throughout French @-@ occupied Egypt . Napoleon also unsuccessfully sought a fatwa from the al @-@ Azhar imams that would deem it permissible under Islamic law to declare allegiance to Napoleon . 
