This elite class consisted of three main groups: the military, the court officials, and clergy. Though the term askeri itself literally means "of the military", it more broadly encompassed all higher levels of imperial administration. To become a member of this ruling elite, one thus had to hold a political office in the service of the Ottoman Empire, meaning that both Muslims and non-Muslims in those positions could rank as askeri.
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).
Sultan Selim III was taken prisoner (1807) and murdered (1808) in the course of Janissary revolts. A subsequent sultan, Mahmud II (r. 1808-1839), was patient but remembered the results of the uprising in 1807. In June 1826 he caused a revolt among the Janissaries, kept them all in their barracks and slaughtered thousands of them.