During the 18th century, the forests and hills of Šumadija were the refuge for the hajduk bands (brigands, rebels, guerilla fighters) that fought against Ottoman occupation. Parts of the Sanjak of Smederevo, all of Šumadija, were liberated by the Austrian army in 1718, resulting in the establishment of the Kingdom of Serbia (1718–39). After the Austro-Russian–Turkish War (1735–39), the sanjak was re-established. In 1788, the Habsburg-organized Serbian Free Corps liberated Šumadija, which, after subsequent Austrian military involvement, came together with the rest of the sanjak under Habsburg occupation (1788–92). The First Serbian Uprising, which broke out in 1804, saw the region liberated under self-organized Serbian rebels led by Šumadijan-born Karađorđe, the national hero of Serbia. The Second Serbian Uprising in 1815 was led by Miloš Obrenović who successfully repelled Ottoman forces and, by 1830, gained full autonomy for Serbia, leading to the independence of central Serbia after several centuries under Ottoman rule.