Between 1718 and 1739, the Sanjak of Smederevo was occupied by the Habsburg Monarchy, which administrated the area as the Kingdom of Serbia. The Serbian Militia operated throughout Serbia proper during the 1737–39 war. The war ended in Ottoman victory, and returning of the sanjak. The northern half of Serbia proper was briefly under Habsburg occupation during the 1787–91 war, then returned. With the First Serbian Uprising (1804–13), the sanjak became a "de facto" Serbian state, known in historiography as "Revolutionary Serbia". It was retaken by the Ottomans in 1813, however, the Second Serbian Uprising (1815–17) saw Serbia recognized as an autonomous principality within the Ottoman Empire. In 1878, Serbia became a fully independent state, also enlarging its territory to the south-east. The 1878 borders correspond to present-day Central Serbia save for small parts in the south-west.