Serbia gained its partial independence from the Ottoman Empire in two uprisings in 1804 (led by Đorđe Petrović – Karađorđe) and 1815 (led by Miloš Obrenović), although Turkish troops continued to garrison the capital, Belgrade, until 1867. In 1817 the Principality of Serbia was granted de facto independence from the Ottoman Empire. High officials in the Austro-Hungarian Empire lobbied for Ottoman approval of the liberal 1869 constitution for Serbia, which depended on the Porte for final approval. Vienna's strategy was that a liberal political system in Serbia would divert its impulse to foment nationalist unrest within the its neighbors, and also delay its efforts to gain territory at the expense of the Ottoman Empire.