The First Serbian Uprising managed to liberate the country for a significant time (1804-1813) from Ottoman Empire; for the first time in three centuries, Serbs governed themselves without the supremacy of the Ottoman Empire or Habsburg Austria.
After the failure of the First Serbian uprising, most commanders escaped to the Habsburg Monarchy; only a few remained in Serbia. Karađorđe Petrović leader of the First Serbian Uprising, escaped with his family. Despite the efforts of Karađorđe to obtain allies among Austrian Serbs, Bosnian Serbs, Russians, or Napoleon Bonaparte, the rebel Serbian state was crushed by the Ottomans in 1813.
Miloš Obrenović surrendered to the Ottoman Turks and received the title of "obor-knez" ("senior leader").Stanoje Glavaš also surrendered to the Turks and was made a supervisor of a road, but the Turks killed him after they became suspicious of him. Hadži Prodan Gligorijević knew the Turks would arrest him and so declared an uprising in 1814, but Obrenović felt the time was not right for an uprising and did not provide assistance.
Hadži Prodan's Uprising soon failed and he fled to Austria. After the failure of this revolt, the Turks inflicted more persecution against the Serbs, such as high taxation, forced labor, and rape. In March 1815, Serbs had several meetings and decided upon a new revolt.
Takovo, proclamation of Uprising.
The national council proclaimed a revolt in Takovo on April 24, 1815. Obrenović was chosen as the leader and famously spoke, "Here I am, here you are. War to the Turks!" When the Ottomans discovered the new revolt they sentenced all of its leaders to death. The Serbs fought in battles at Ljubić, Čačak, Palež, Požarevac and Dublje and drove the Ottomans out of the Pashaluk of Belgrade.
In mid-1815, the first negotiations began between Obrenović and Maraşlı Ali Paşa (English, Marashli Ali Pasha; Serbian, Marašli Ali Paša), the Ottoman governor. Obrenović managed to get a form of partial autonomy for Serbs, and, in 1816, the Turkish Porte signed several documents for the normalization of relations between Serbs and Turks. The result was acknowledgment of a Serbian Principality by the Ottoman Empire. Although the principality paid a yearly tax to the Porte and had a garrison of Turkish troops in Belgrade until 1867, it was, in most other matters, an independent state.
In 1817, Obrenović succeeded in forcing Maraşlı Ali Paşa to negotiate an unwritten agreement, and, with this, the Second Serbian uprising was finished. The same year, Karađorđe, the leader of the First Uprising, returned to Serbia and was assassinated by Obrenović's orders. Obrenović received the title of Prince of Serbia. Under the grandson of his brother, Milan, Serbia gained complete independence in 1878 in the Treaty of Berlin.
• 1815, April - Senior Leader Miloš Obrenović declares war against Ottoman Empire.
• 1815, December - Most of the contemporary Central Serbia has been liberated and Ottoman army expelled from the country.
• 1816 - Ottoman Empire offers certain level of autonomy to revolutionary Serbia. Serbian leaders reject the treaty.
• 1817 - The Uprising comes to an end as Miloš Obrenović signs a treaty with Ottoman commander Maraşlı Ali Paşa. Principality of Serbia has been declared, with Miloš Obrenović as its Prince.
• 1830 - Serbia's semi-independence is reafirmed by a Ferman from the Porte.
• 1835 - First Constitution in the Balkans is written in the Principality of Serbia. It introduces Serbian Parliamenton the regular basis. Obrenović dynasty is a legal heir to the throne of Serbia. It also describes Serbia as an independent parliamentary Principality, which outrages Ottoman Empire and Habsburg monarchy.
• 1848 - Spring of nations erupts in, among others, Serbian-populated areas of Habsburg Empire. As Vojvodina of Serbia and Tamiš Banat proclaim unification with the Principality of Serbia, the rebellion comes to an end byVienna's diplomatic efforts.
• 1867 - Serbia becomes de facto independent as Ottoman forces leave the country, pressured by Great Britainand France.
• 1878 - De jure independence is formally declared in Belgrade by the decision of the Great Powers at the Treaty of Berlin – itself a revision of the earlier Treaty of San Stefano which had recognised Serbia's independence.