Selim III attempted reforms to modernize the Ottoman military and bureaucracy in the late 18th century, including establishing European-style units and curbing provincial powers, but faced opposition from traditional groups like the Janissaries and was eventually deposed. The Crimean War in the mid-19th century further weakened the Ottomans and led European powers to impose controls over the empire and its territories while avoiding outright conquest for strategic reasons. This period saw the beginnings of secularization and integration into European economic and political spheres for the Ottomans.