Conquered by the Turks in 1389, Serbia did not regain independence until 1878, and established a monarchy in 1882. Geographically a land-locked state, Serbia had the Austro-Hungarian Empire on its borders in the north, and Romania and Bulgaria in the east. To the south lay Macedonia and the northern shores of Greece, including the major port of Salonika.
Serbia was an overwhelmingly rural society. It had few mineral or industrial resources and had less than 10,000 people employed in manufacturing. The economy relied heavily on the exports of food to Germany, Turkey and Austria-Hungary.
In 1903 Dragutin Dimitrijevic, Voja Tankosic and a group of junior officers planned the assassination of the the autocratic and unpopular King Alexander of Serbia. The group stormed the royal palace and killed both the king and his wife, Queen Draga. Soon afterwards, Karadjordjevic was elected king of Serbia by the Serbian parliament and Nikola Pasic became prime minister. The new National Assembly was elected by all civilian male tax payers.
Serbian encouragement of Slav separatist movements in Bosnia-Herzegovina and Croatia angered the government of Austria-Hungary. Serbia received support from Russia in this policy but the two countries were unable to prevent the Austro-Hungarian Army from seizing Bosnia in 1908.
In May 1911, ten men in Serbia formed the Black Hand Secret Society. Early members included Colonel Dragutin Dimitrijevic, the chief of the Intelligence Department of the Serbian General Staff, Major Voja Tankosic and Milan Ciganovic. The main objective of the Black Hand was the creation, by means of violence, of a Greater Serbia. Its stated aim was: "To realize the national ideal, the unification of all Serbs. This organisation prefers terrorist action to cultural activities; it will therefore remain secret."
Dragutin Dimitrijevic, who used the codename, Apis, established himself as the leader of the Black Hand. In 1911 he sent a member to assassinate Emperor Franz Josef. When this failed, Dimitrijevic turned his attention to General Oskar Potiorek, Governor of the Austrian provinces of Bosnia-Herzegovina. Dimitrijevic recruited Muhamed Mehmedbasic to kill Potiorek with a poisoned dagger. However, Mehmedbasic returned to Belgrade after failing to carry out the task.
In 1912, during the Balkan War, Serbia, Greece, Bulgaria and Montenegro won a series of comprehensive military victories over Turkish forces. The following year, Bulgaria, disappointed by the terms of the Treaty of London, attacked Greek and Serbian forces, but was quickly defeated when invaded by Romania. The subsequent peace treaty doubled the size of Serbia and gave Greece control over most of the Aegean coast.
After the war Serbia had a population of 4.5 million. All males aged between 21 and 46 were liable for compulsory military service and by 1914 the Serbian Army contained about 260,000 men.