<Table> <Tr> <Th_colspan="2"> Egyptian Campaign </Th> </Tr> <Tr> <Td_colspan="2"> Part of the Mediterranean campaign of 1798 </Td> </Tr> <Tr> <Td_colspan="2"> Battle of the Pyramids </Td> </Tr> <Tr> <Td_colspan="2"> <Table> <Tr> <Th> Date </Th> <Td> 1 July 1798--2 September 1801 (3 years, 2 months and 1 day) </Td> </Tr> <Tr> <Th> Location </Th> <Td> Egypt, Levant </Td> </Tr> <Tr> <Th> Result </Th> <Td> <P> Ottoman - British victory </P> <Ul> <Li> French conquest of Egypt and end of Mameluke rule </Li> <Li> Failure of French expedition to Syria </Li> <Li> Capitulation of French administration in Egypt </Li> </Ul> </Td> </Tr> </Table> </Td> </Tr> <Tr> <Th_colspan="2"> Belligerents </Th> </Tr> <Tr> <Td> <P> Ottoman Empire </P> <Ul> <Li> Mamluks </Li> <Li> Beylik of Tunis </Li> <Li> Regency of Algiers </Li> </Ul> Great Britain </Td> <Td> France </Td> </Tr> <Tr> <Th_colspan="2"> Commanders and leaders </Th> </Tr> <Tr> <Td> <P> Selim III Kör Yusuf Ziyaüddin Pasha Mustafa Pasha Jezzar Pasha Murad Bey Ibrahim Bey William Sidney Smith Ralph Abercrombie (DOW) </P> Horatio Nelson </Td> <Td> <P> Napoleon Bonaparte Jean Baptiste Kléber † Thomas - Alexandre Dumas </P> Jacques - Francois Menou </Td> </Tr> <Tr> <Th_colspan="2"> Strength </Th> </Tr> <Tr> <Td> <P> Ottoman Empire: 220,000 </P> <Ul> <Li> Army of Egypt: 80,001 </Li> <Li> Army of Rhodes: 20,000 </Li> <Li> Army of Syria: 20,000 </Li> <Li> Army of the East: 30,000 </Li> <Li> 2nd invasion of Egypt: 60,000 </Li> </Ul> Great Britain: 30,000 </Td> <Td> 40,000 + men (land) </Td> </Tr> <Tr> <Th_colspan="2"> Casualties and losses </Th> </Tr> <Tr> <Td> 50,000 killed or wounded 15,000 prisoners </Td> <Td> 15,000 killed or wounded 8,500 prisoners </Td> </Tr> </Table> <Tr> <Th_colspan="2"> Egyptian Campaign </Th> </Tr>

Who ruled egypt at the time of the french invasion