The Serbian Revolution for independence from the Ottoman Empire lasted eleven years, from 1804 until 1815. The revolution comprised two separate uprisings which gained autonomy from the Ottoman Empire that eventually evolved towards full independence (1835–1867). During the First Serbian Uprising, led by Duke Karađorđe Petrović, Serbia was independent for almost a decade before the Ottoman army was able to reoccupy the country. Shortly after this, the Second Serbian Uprising began. Led by Miloš Obrenović, it ended in 1815 with a compromise between Serbian revolutionaries and Ottoman authorities. Likewise, Serbia was one of the first nations in the Balkans to abolish feudalism. Serbs are among the first ethnic groups in Europe to form a nation and a clear sense of national identity.