 Napoleon invaded Egypt in July 1798 , arriving in Alexandria on July 2 and moving on to Cairo on July 22 . In a bid to placate both the Egyptian population and the Ottoman Empire , Napoleon gave a speech in Alexandria in which he proclaimed his respect for Islam and the Sultan : 
