Serbs entered their present territory early in the 7th century AD, settling in six distinct tribal delimitations: Rasia/Raka (corresponding to present-day Western Serbia and Northern Montenegro), Bosnia (http://members.tripod.com/cafehome/serbdom-eng.htm#Ninoslav) (considered by some to have been one with Rascia), Neretva/Pagania (middle Dalmatia), Zachumlie/Zahumlje (W Hercegovina), Terbounia/Travunija (E Hercegovina) and finally Zeta (http://www.njegos.org/siteindex/medieval.htm) (roughly corresponding to present-day Montenegro). The first Serb state sprung under Caslav Klonimirovic in the mid 10th century in Rascia. However the end of 11th century saw the rise of the Vojislavljevic family in Zeta (http://www.njegos.org/siteindex/medieval.htm). Finally, the middle of the 12th century saw once more the rise of Rascia with the Nemanjic dynasty. The Nemanjic were to lead Serbia to a golden age which lasted for over three centuries and saw the advent of a powerful Balkan state which had its apogee under the reign of Tsar Dusan in the mid 14th century, before finally succumbing to Ottoman Turkish[?] subjugation (with Zeta, the last bastion, finally falling in 1499).
Serbia gained its autonomy from the Ottoman Empire in two uprisings, (1804 and 1815), though Turkish troops continued to garrison the capital, Belgrade until 1867. Renewed war alongside Russia against the Turks in 1877 brought full independence and large territorial gains toward the south-east, including Niš, henceforth Serbia's second city (Treaty of Berlin, 1878).
The new country was, like most of the Balkan lands, overwhelmingly agrarian with little in the way of industry or modern infrastructure. The total population rose from a million in the early 19th century to 2.5 million in 1900, when Belgrade contained 69,000 inhabitants, Niš 24,500 and half a dozen other cities 10-15,000 each.
Internal politics revolved largely around the dynastic rivalry between the Obrenovic[?] and Karadjordjevic families[?], descendants respectively of Miloš Obrenovic, (recognised as hereditary prince in 1829) and [[Kara [Black] George]], leader of the 1804 revolt but killed, allegedly at Miloš's behest, in 1817. The Obrenovici headed the emerging state in 1817-1842 and 1858-1903, the Karadjordjevici in 1842-1858 and after 1903.
After the 1880s the dynastic issue became entwined to some extent with wider diplomatic divisions in Europe, Milan Obrenovic[?] aligning his foreign policy with that of neighbouring Austria-Hungary in return for Habsburg's support for his elevation to king. The Karadjordjevici inclined more toward Russia, gaining the throne in June 1903 after a bloody palace coup by army officers hostile to Habsburg rule over neighbouring South Slavs.
Serbian opposition to Austria-Hungary's October 1908 annexation of Bosnia-Herzegovina brought about a serious European crisis: German and Austro-Hungarian pressure forced Russia to prevail on Serbia (March 31, 1909) to accept the annexation, but Russia undertook to defend Serbia against any future threat to her independence.
Following Bulgaria's independence (October 1908) from Ottoman overlordship and a successful movement by Greek army officers (August 1909) to steer their government onto a more nationalistic course, Serbia joined with the other two countries and her Serb-populated neighbour Montenegro in invading (October 1912) Ottoman-held Macedonia (not the Republic of Macedonia) and reducing Turkey-in-Europe to a small region around Constantinople (now Istanbul). Bulgaria failed in her subsequent attempt (July 1913) to take from her allies' territory which she had originally been promised (see Balkan Wars), but to Habsburg alarm at another near-doubling of Serbia's territory was added Bulgarian resentment at having been denied what she saw as her just share of the territorial gains.
The assassination in the Bosnian capital Sarajevo (June 28, 1914) of the Archduke Francis Ferdinand, heir to the Habsburg throne, by pro-Serb youth, provoked an ultimatum from Vienna requiring Serbia to allow Austro-Hungarian investigation of the plot on Serbian soil. Serbia agreed to comply on, (July 25) nonetheless three days later, the Austro-Hungarian empire declared war. Russia's support for Serbia, resulted in a mobilisation[?], this in turn brought a German ultimatum requiring her to stand down her forces, and war was declared among the great powers in the first week of August.
Serbia repulsed three Austro-Hungarian invasions (August, September and November-December 1914), in the last of which Belgrade was held temporarily by the enemy. But during 1915 an epidemic of typhus decimated the Serbian army, and renewed invasion in early October, this time involving also German and Bulgarian forces, resulted in the occupation of the whole country. The remnants of Serbia's armed forces retreated into Albania and Macedonia, where British and French forces had landed at Thessaloniki.
The period of government exile in Macedonia was marked by a significant shift in the balance of political forces, when the pan-Serb militant Col. Dragutin Dimitrijevic[?] ("Apis"), a leader of the 1903 coup and head of the shadowy "Black Hand" organisation accused of complicity in the Sarajevo assassination) was tried and executed (June 1917) on charges of plotting against the royal government. Military circles would henceforth be dominated by the royalist "White Hand[?]" faction of Gen. Petar Živkovic, later prime minister (1929-1932) of an extra-constitutional[?] monarchical regime.
A successful Allied offensive in September 1918 secured first Bulgaria's surrender and then the liberation of the occupied territories (November 1918). On November 29 the National Assembly of Montenegro[?] voted for union with Serbia, and two days later an assembly of leaders of Austria-Hungary's southern Slav regions voted to join the new State of the Serbs, Croats and Slovenes. For subsequent history, see Yugoslavia.