Small-scale rebellious activity akin to guerilla warfare has a long history in the South Slav lands, particularly in those areas that were under Ottoman rule for a long period. In the First Serbian Uprising which began in 1804, bandit companies () played an important part until large-scale fighting gave the Ottomans the upper hand and the uprising was suppressed by 1813. A second rebellion broke out two years later, and guerilla warfare was again utilised to significant effect, assisting in the establishment of the partially-independent Principality of Serbia, which was expanded significantly in 1833 and became fully independent in 1878. Throughout this period and until the end of the 19th century interest in guerilla warfare remained, with books on the subject being commissioned by the Serbian government and published in 1848 and 1868. Four years after independence, the principality became the Kingdom of Serbia.