<P> The rise of nationalism swept through many countries during the 19th century, and it affected territories within the Ottoman Empire . A burgeoning national consciousness, together with a growing sense of ethnic nationalism, made nationalistic thought one of the most significant Western ideas imported to the Ottoman Empire . The empire was forced to deal with nationalism from both within and beyond its borders . The number of revolutionary, secret societies which turned into political parties during the next period rose dramatically . Uprisings in Ottoman territory had many far - reaching consequences during the 19th century and determined much of the Ottoman policy during the early 20th century . Many Ottoman ruling elite questioned whether the policies of the state were to blame: some felt that the sources of ethnic conflict were external, and unrelated to issues of governance . While this era was not without some successes, the ability of the Ottoman state to have any effect on ethnic uprisings was seriously called into question . </P> <P> The Russian extension in this century developed with the main theme of supporting independence of Ottomans' former provinces and then bringing all of the Slav peoples of the Balkans under Bulgaria or using Armenians in the east sets the stage . At the end of the century from Russian perspective; Romania, Serbia and Montenegro and autonomy of Bulgaria was achieved . That alarmed the Great Powers . After the Congress of Berlin the Russian expansion was controlled through stopping the expansion of Bulgaria . The Russian public felt that at the end of Congress of Berlin thousands of Russian soldiers had died for nothing . </P> <P> The military of the Ottoman Empire remained an effective fighting force until the second half of the eighteenth century, when it suffered a catastrophic defeat against Russia in the 1768 - 74 war . Selim III came to the throne with an ambitious effort in military reforms in 1789 . He failed . Selim III was replaced by Mahmud II in 1808 who established martial law of Alemdar Mustafa Pasha . His first task was to ally with the Janissaries in order to break the power of the provincial governors . He then turned on the Janissaries and removed them from power during Auspicious Incident in 1826 . Efforts for a new system (1826--1858) began following the Auspicious incident . </P> <P> The stagnation and reform of the Ottoman Empire (1683--1827) ended with the dismemberment of Ottoman Classical Army . The issue during the decline and modernization of the Ottoman Empire (1828--1908) was to create a military (a security apparatus) that could win wars and bring security to its subjects . That goal took multiple Sultans with multiple reorganizations during this period . At the end of this period, with the Second Constitutional Era in 1908, - with a degree of - Ottoman military became modernized and professionalized in the form of European Armies . </P>

What led to the ottoman military decline of the nineteenth century