 Napoleon 's efforts to win over both the Egyptians and the Ottomans proved unsuccessful ; the Ottoman Empire declared war on September 9 , 1798 , and a revolt against French troops was launched from al @-@ Azhar on October 21 , 1798 . Egyptians armed with stones , spears , and knives rioted and looted . The following morning the diwan met with Napoleon in an attempt to bring about a peaceful conclusion to the hostilities . Napoleon , initially incensed , agreed to attempt a peaceful resolution and asked the sheikhs of the diwan to organize talks with the rebels . The rebels , believing the move indicated weakness among the French , refused . Napoleon then ordered that the city be fired upon from the Cairo Citadel , aiming directly at al @-@ Azhar . During the revolt two to three hundred French soldiers were killed , with 3 @,@ 000 Egyptian casualties . Six of the ulema of al @-@ Azhar were killed following summary judgments laid against them , with several more condemned . Any Egyptian caught by French troops was imprisoned or , if caught bearing weapons , beheaded . The French troops intentionally desecrated the mosque , walking in with their shoes on and guns displayed . The troops tied their horses to the mihrab and ransacked the student quarters and libraries , throwing copies of the Quran on the floor . The leaders of the revolt then attempted to negotiate a settlement with Napoleon , but were rebuffed . 
