At the time of Archduke Franz Ferdinand's assassination, Serbia was technically independent, yet many Serbs lived in Bosnia, Herzegovina, etc. In 1905, Austria had formally annexed Bosnia and Herzegovina, over which Austria had previously held the right to "occupy and administer." This annexation enraged Serbs throughout the Balkans, but little could be done. Later, a series of wars broke out in which Austria intervened. As a result of the wars, Serbia was forced to cede Albania to Austria. Austria, part of the Austro-Hungarian Empire, had hoped to use its occupation of the Balkans as a buffer against Russian intervention.
A Serbian nationaist group, known as the Black Hand, planned to assassinate Franz Ferdinand while he visited Sarajevo in an attempt to end Austrian occupation of Bosnia. Ferdinand was the heir apparent of the Austro-Hungarian Empire after the sitting Emperor, Franz Joseph, his uncle. By assassinating him, the Black Hand hoped to "decapitate" the Austro-Hungarian Empire. In the end, all they did was set a series of events in motion which led to World War I.