Ideas of nationalism emerged in Europe in the 19th century at a time when most of the Balkans were still under Ottoman rule. The Christian peoples of the Ottoman Empire, starting with Serbs and Greeks, but later spreading to Montenegrins and Bulgarians, began to demand autonomy in a series of armed revolts beginning with the Serbian Revolution (1804–17) and the Greek War of Independence (1821–29), which established the Principality of Serbia and Hellenic Republic. The first revolt in the Ottoman Empire fought under a nationalist ideology was the Serbian Revolution. Later the Principality of Montenegro was established through the Montenegrin secularization and the Battle of Grahovac. The Principality of Bulgaria was established through the process of the Bulgarian National Revival, and the subsequent National awakening of Bulgaria, establishment of the Bulgarian Exarchate, April Uprising of 1876 and the Russo-Turkish War (1877–1878).