During the 18th century, the forests of Šumadija were the refuge for the Hajduks that fought against Ottoman occupation. The first Serbian uprising in 1804 was led by national hero Karađorđe. The second Serbian uprising in 1815 was led by Miloš Obrenović who successfully repelled the Turkish forces and, by 1830, Serbia had gained its full autonomy. Because of Miloš's efforts and negotiations Serbia was finally an independent state, after centuries under Ottoman reign.