After Napoleon invaded Ottoman Egypt in 1798, a reform movement in the regime of Sultan Selim III aimed to reduce the numbers of the askeri class, who were the first-class citizens or military class (also called Janissaries).