Though an Austro-Hungarian occupying force quickly subjugated initial armed resistance upon take-over, tensions remained in certain parts of the country (particularly Herzegovina) and a mass emigration of predominantly Muslim dissidents occurred. However, a state of relative stability was reached soon enough and Austro-Hungarian authorities were able to embark on a number of social and administrative reforms which intended to make Bosnia and Herzegovina into a "model colony". With the aim of establishing the province as a stable political model that would help dissipate rising South Slav nationalism, Habsburg rule did much to codify laws, to introduce new political practices, and generally to provide for modernization.
Although successful economically, Austro-Hungarian policy - which focused on advocating the ideal of a pluralist and multi-confessional Bosnian nation (largely favored by the Muslims) - failed to curb the rising tides of nationalism. The concept of Croat and Serb nationhood had already spread to Bosnia and Herzegovina's Catholics and Orthodox communities from neighboring Croatia and Serbia in the mid 19th century, and was too well-entrenched to allow for the wide-spread acceptance of a parallel idea of Bosnian nationhood. By the latter half of the 1910s, nationalism was an integral factor of Bosnian politics, with national political parties corresponding to the three groups dominating elections.
The idea of a unified South Slavic state (typically expected to be spear-headed by independent Serbia) became a popular political ideology in the region at this time, including in Bosnia and Herzegovina. The Austro-Hungarian government's decision to formally annex Bosnia-Herzegovina in 1908 (the Bosnian Crisis) added to a sense of urgency among these nationalists. The political tensions caused by all this culminated on June 28, 1914, when Serb nationalist youth Gavrilo Princip assassinated the heir to the Austro-Hungarian throne, Archduke Franz Ferdinand, in Sarajevo; an event that proved to be the spark that set off World War I. Although 10% of the Bosniak population died serving in the armies or being killed by the various warring states, Bosnia and Herzegovina itself managed to escape the conflict relatively unscathed.