Following a long period of military setbacks against European powers, the Ottoman Empire gradually declined into the late nineteenth century