Since the Habsburg expansion towards those northern regions, in 1699 and 1718, Ottoman rule was gradually reduced to Serbian territories south of the Sava and Danube rivers (1739).
It was crushed by the Ottomans in 1813, but already in 1815 the Second Serbian Uprising broke out, resulting in a new political settlement and the creation of the autonomous Principality of Serbia.
Its territory was expanded in 1833, and again in 1878, also gaining full independence from the sultan and thus reducing Ottoman rule to historical regions of the Old Serbia.
[6] The Battle of Kosovo defined the long-term fate of Serbia, because now it had no force capable of standing up to the Ottoman Turks directly.
His cousin and heir Đurađ Branković moved the capital of the Serbian Despotate to the newly built fortified town of Smederevo.
Traditions of the Serbian Despotate were continued in southern parts of the Kingdom of Hungary by exiled members of the Branković dynasty and their successors until 1537.
[7][8] From the 14th century onward an increasing number of Serbs began migrated north to the in southern parts of the Kingdom of Hungary, mainly the region today known as Vojvodina.
Taking advantage of the extremely confused military and political situation, the Hungarian noblemen from the region joined forces against him and defeated the Serbian troops in the summer of 1527.
For a short time, the Serb rebels captured several cities in Banat, including Vršac, Bečkerek, and Lipova, as well as Titel and Bečej in Bačka.
The Serb Uprising of 1596-97 in the region of Hercegovina and surrounding areas was organized by Serbian Patriarch Jovan Kantul and led by voyvode Grdan.
These three powers incited the Serbs to rebel against the Ottoman authorities, and soon uprisings and guerrilla warfare spread throughout the western Balkans, ranging from Montenegro and the Dalmatian coast to the Danube basin and Old Serbia (Macedonia, Raška, Kosovo and Metohija).
Having to choose between Ottoman reprisal and living in a Christian state, Serbs abandoned their homesteads and headed north, led by Serbian Patriarch Arsenije III.
[18] In the meanwhile, a Serbian-Russian noble, count Sava Vladislavich maintained contacts with Ottoman Serbs and was under the impression that they would rise in revolt against the Sultan as soon as Russians invaded the Danubian Principalities.
In the latter half of the XVIII century, officer Koča Anđelković led a successful Serbian rebellion against the Ottomans, during the last Habsburg-Ottoman war (1788–1791), hoping to place central Serbia under the Habsburg rule.
[22] In 1802, renegade Janissary leaders, known as dahias, imprisoned and murdered Hadji Mustafa Pasha, sultan's governor in Belgrade, and imposed the rule of terror.
When they were found out in 1804, dahias rounded up and murdered 70 prominent Serbian leaders and priests, many of them being tortured and publicly executed in a spree of terror, known as the Slaughter of the Knezes.
Within days, in the small Šumadija village of Orašac, the Serbs gathered on February 14th to proclaim the uprising, electing Đorđe Petrović, known as Kara-Đorđe (Black George) as the leader.
[23] Initially fighting to restore their local privileges within the Ottoman system (until 1807), the rebels – supported by the wealthy Serbian community from the southern regions of the Austrian Empire (present-day Vojvodina) and Serbian officers from the Austrian Military Frontier – offered themselves to be placed under the protection of Habsburg, Russian and French Empires respectively, entering, as a new political factor, into the converging aspirations of the Great Powers during the Napoleonic wars in Europe.
Combining patriarchal peasant democracy with modern national goals, the Serbian revolution was attracting thousands of volunteers among Serbs from across the Balkans and Central Europe.
The Serbian Revolution ultimately became a symbol of the nation-building process in the Balkans, provoking peasant unrest among Christians in both Greece and Bulgaria.
[25] Following a successful siege with 25,000 men, on 8 January 1807 the charismatic leader of the revolt, Karađorđe Petrović, proclaimed Belgrade the capital of Serbia.
Karađorđe and other revolutionary leaders sent their children to the Grand School, which also had among its students Vuk Stefanović Karadžić (1787–1864), the famous reformer of the Serbian alphabet.
Belgrade was repopulated by local military leaders, merchants and craftsmen, but also by an important group of enlightened Serbs from the Habsburg Empire who gave a new cultural and political framework to the egalitarian peasant society of Serbia.
Dositej Obradović, a prominent figure of the Balkan Enlightenment, the founder of the Great Academy, became the first Minister of Education in modern Serbia in 1811.
One quarter of Serbia's population (at that moment around 100,000 people) were exiled into the Habsburg Empire, including the leader of the Uprising, Karađorđe Petrović.
Recaptured by the Ottomans in October 1813, Belgrade became a scene of brutal revenge, with hundreds of its citizens massacred, and thousands sold into slavery as far away as Asia.
The revolutionary council proclaimed an uprising in Takovo on April 23, 1815, with Milos Obrenović chosen as the leader (while Karađorđe was still in exile in Austria).
Those territories were liberated during the Balkan Wars (1912-1913) and incorporated into the Kingdom of Serbia, thus ending the Ottoman rule in Serbian lands.