In 1718, Požarevac was the site of the signing of the Treaty of Požarevac, with the town then falling under Habsburg control and becoming part of the Habsburg Kingdom of Serbia (from 1718 to 1739). After 1739, the town reverted to Ottoman control except final Austrian occupation between 1789 and 1791. During the First Serbian Uprising (1804-1813), the town was part of the Karađorđe's Serbia. At the end of the uprising in 1813, the town came briefly once more under direct Ottoman control. However, following the Second Serbian Uprising from 1815, the town then became part of the autonomous Ottoman Principality of Serbia. Požarevac was the second capital of the Serbian prince, Miloš Obrenović with the first regular state court in Serbia being established here in 1821. Since 1878, Požarevac became part of the independent Principality of Serbia and since 1882 as part of the Kingdom of Serbia.