Inside the Ottoman Empire the Principilaty of Serbia becomes autonomous in 1815. After the Russo-Turkish War of 1828-29, Serbia becomes an internationally recognized principality under Turkish suzerainty and Russian protection and the state expands steadily southward. After an insurrection in Bosnia and Herzegovina in 1875, both Serbia and Montenegro go to war against Turkey in 1876-78 in support of the Bosnian rebels. With Russian assistance, Serbs gain more territory as well as formal independence in 1878 as the Kingdom of Serbia. Bosnia is placed under Austrian administration. In 1903 the king is replaced by Petar Karadjordjevic and the constitutional monarchy becomes a fact. Serbian politics is dominated by the Narodna Radikalna Stranka (People's Radical Party, NRS), often led by Nikola Pasić.
After the Balkan Wars Serbia annexes Macedonia in 1912. Pasić becomes prime minister for the fifth time in 1912. Serb animosity against the Habsburgs rulers of Austria reach a climax in 1914, when the Austrian archduke Franz Ferdinand is assassinated in Sarajevo by a Bosnian Serb, Gavrilo Princip, setting off a series of diplomatic and military initiatives among the great powers that culminate in World War I. After the defeat of Austria in World War I, Vojvodina and Montenegro unite with Serbia and Serbia joins Slovenia, Croatia and Montenegro into the State of Slovenes, Croats and Serbs, renamed in 1918 Kingdom of Serbs, Croats and Slovenes.
The new kingdom is a parliamentary democratic state. It is dominated by ethnic parties, with the exception of the liberal Demokratska Stranka (Democratic Party, DS) and the left-wing parties. The Serbian prime minister Nikola Pasić of the NRS becomes the first prime minister of the new kingdom. He is succeeded later in 1918 by Stojan Protić (NRS), in 1919 by Ljubomir Davidović of the Demokratska Stranka (Democratic Party, DS), in 1920 again by Protić and later in 1920 by Milenko Vesnić. Nikola Pasić becomes prime minister in 1921 again. He rules until 1924, when Davidović takes over. Later that year Pasić takes over again. The NRS rule is continued since 1926 by Nikola Uzunović and Velimir Vukicević. After the assassination of the Croatian peasants' leader Nikola Radić, a coalition takes over government under Anton Korošec of the Slovenska Ljudska Stranka (Slovenian People's Party, SLS) as prime minister.
Later in 1928 King Alexander establishes a royal dictatorship, based on the Serbs and he renames the country Kingdom of Yugoslavia in 1929. He establishes the only allowed party, the Jugoslovenska Radikalno-Seljačka Demokratija (Jugoslav Radical Peasants' Democracy, JRSD). The JSRD delivers the prime ministers: Petar Živković (1929-1932), Vojislav Marinković (DS, 1932), Milan Srškić (1932-1934) and in 1934 Nikola Uzunović. By that time the JRSD is renamed Jugoslovenska Nacionalna Stranka (Yugoslav National Party, JNS). In 1934 king Alexander is assassinated. Bogoljub Jevtić becomes prime minister. With the support of the royal court a list headed by him wins the elections. Milan Stojadinović forms in 1935 the Jugoslovenska Radikalna Zajednica (Yugoslav Radical Union Party, JRZ) and he becomes prime minister until 1939. He is succeeded by Dragisa Cvetković (1939-1941) and in 1941 by Dusan T. Simović.
During World War II Yugoslavia is occupied and partially annexed by Italy and Germany. In Croatia a puppet state is formed. In 1943 Yugoslavia is reconstituted as Democratic Federative Yugoslavia and the war against the occupies continues. After the liberation Yugoslavia becomes a communist dictatorship in 1945 named Federative People's Republic of Yugoslavia led by Josip Broz Tito and his Komunistička Partija Jugoslavije (Communist Party of Yugoslavia, KPJ). Tito is prime minister from 1945 until 1953. That year he becomes president. The communists reorganize Yugoslavia in 1963 into a federation of republics as the Socialist Federative Republic of Yugoslavia. The communist party remains under the name Savez Komunista Jugoslavije (League of Yugoslav Communists, SKJ) the only allowed party. When Tito dies in 1980 he is succeeded by a collective presidency.
In 1989 riding a wave of nationalist sentiment, Serbian president Slobodan Milosević reimposes direct rule over the autonomous provinces of Kosovo and Vojvodina, prompting Albanians in Kosovo to agitate for separation from Serbia. Between 1991 and 1992 Slovenia, Croatia, Macedonia and Bosnia and Herzegovina all secede from Yugoslavia. In 1992 Serbia and Montenegro join in passing the constitution of the Federal Republic of Yugoslavia. Yugoslavia is governed by an authoritarian regime led by diehard communist and nationalist Milosević. The regime tries to prevent these secessions and tries to control the Albanian populated province of Kosovo. In 1992 the non-partisans Dobrica Cosić becomes president and Milan Panić prime minister. Cosić is succeeded in 1993 by Zoran Lilić of the SPS. In 1997 Slobodan Milosević himself becomes federal president.
Even as opposition to the his regime groes in the late 1990s, Milosević continues to dominate the organs of Yugoslavia. Although his political party, the Socijalisticka Partija Srbije (Socialist Party of Serbia, SPS), doesn't enjoy a majority in either the federal or Serbian parliaments, it dominates the governing coalitions and holds all the key administrative posts. In reaction to the oppression of the Kosovars the North Atlantic Treaty Organisation bombs in 1999 the regime out of Kosovo and the province is placed until international administration. Routine federal elections in 2000 result in a narrow official victory for Milosević and his coalition. Immediately, street protests and rallies fill cities across the country as Serbs rally around Vojislav Kostunica of the Demokratska Stranka Srbije (Democratic Party of Serbia, DSS), the recently formed Democratic Opposition of Serbia (DOS, a broad coalition of anti-Milosević parties) candidate for president. Milosević is forced to concede defeat after days of mass protests all across Serbia. Yugoslavia becomes a parliamentary republic. Vojislav Kostunica becomes federal president and the leader of the Demokratska Stranka (Democratic Party, DS), Zoran Djindjić, is elected Serbian prime minister. The DOS coalition collapses and by the by the middle of 2002, the nationalist Kostunica and the pragmatic Djindjić are openly at odds. The federation is restyled into a confederation called Serbia and Montenegro in 2003. In 2003 Djindjić is assassinated. Zoran Zivković, a vice-president of Djindjić's DS party, is elected prime minister and later in 2003 early elections in Serbia are called.
These elections are won by democratic nationalist parties and other nationalist forces. Vojislav Kostunica becomes prime minćister of Serbia.