The Principality of Serbia () was an autonomous, later sovereign state in the Balkans that came into existence as a result of the Serbian Revolution. Its creation was negotiated first through an unwritten agreement between Miloà ¡ ObrenoviÃÂ, leader of the Second Serbian Uprising, and Ottoman official Marashli Pasha, followed by a series of decrees of the Sublime Porte in 1828âÂÂ1833. Its de facto independence ensued in 1867, following the evacuation of the remaining Ottoman troops from the Belgrade Fortress and the country; its independence was recognized internationally in 1878 by the Treaty of Berlin. In 1882 the country was elevated to the status of kingdom.
The Serbian revolutionary leadersâÂÂfirst KaraÃÂorÃÂe and then Miloà ¡ ObrenoviÃÂâÂÂsucceeded in their goal of liberating Serbia from centuries-long Ottoman rule. Ottoman authorities acknowledged the state by the 1830 Hatt-i Sharif, and Miloà ¡ Obrenoviàbecame the hereditary prince (knjaz) of Serbia. Serbia was de jure an autonomous province of the Ottoman Empire, its autonomy was constrained by the presence of the Ottoman army on its soil and by being forced to pay to Istanbul a yearly tribute of 2.3 million groschen, which represented about 10% of the country's budget.
At first, the principality included only the territory of the former Pashaluk of Belgrade, but in 1831âÂÂ1833 it expanded to the east, south, and west. In 1866 Serbia began the campaign of forging the First Balkan Alliance by signing a series of agreements with other Balkan entities in the period 1866âÂÂ1868. On 18 April 1867 the Ottoman government ordered the Ottoman garrison, which since 1826 had been the last representation of Ottoman suzerainty in Serbia, withdrawn from the Belgrade fortress. The only stipulation was that the Ottoman flag continue to fly over the fortress alongside the Serbian one. Serbia's de facto independence dates from this event. A new constitution in 1869 defined Serbia as an independent state. Serbia was further expanded to the southeast in 1878, when its independence from the Ottoman Empire won full international recognition at the Treaty of Berlin. The Principality would last until 1882 when it was raised to the level of the Kingdom of Serbia.
The Ottoman-derived nahija remained as the highest administrative unit until 1834. Following 1836, Serbia was administratively organized into 17 okrug (districts), in turn divided into srez.
The Armed Forces of the Principality of Serbia was the armed forces of the Principality of Serbia. Founded in 1830, it became a standing army to take part to the First and Second Serbo Turkish Wars of 1876âÂÂ1878, the first conflict in the nation's modern history, after which the country gained its full independence. It was succeeded by the Royal Serbian Army.
In the first decades of the principality, the population was about 85% Serb and 15% non-Serb. Of those, most were Vlachs, and there were some Muslim Albanians, which were the overwhelming majority of the Muslims that lived in Smederevo, Kladovo and ÃÂuprija. The new state aimed to homogenize its population. As a result, from 1830 to the wars of the 1870s in which Albanians were expelled from the country, it has been estimated that up to 150,000 Albanians that lived in the territories of the Principality of Serbia had been expelled. In 1862 more than 10,000 Muslims were expelled to Ottoman Bulgaria and Ottoman Bosnia. During the SerbianâÂÂOttoman Wars of 1876âÂÂ1878, the Muslim population was expelled from the Sanjak of Nià ¡.
The Principality was ruled by the Obrenoviàdynasty, except for a period under Prince Aleksandar of the KaraÃÂorÃÂeviàdynasty. Princes Miloà ¡ and Mihailo Obrenoviàeach reigned twice.