World War I was caused by both long and short term factors, primarily the assassination of Archduke Franz Ferdinand at the height of Austria-Hungarian and Serbian friction, which acted as a trigger for the declaration of war. The long term factors involved were much more general; widespread imperialism and nationalism across Europe set the field for a large-scale war, and the growing number of pacts and alliances between nations meant that a war would no longer be confined to two hostile nations. At a specific level, nationalism and militarism contributed greatly to the tensions between Austria-Hungary and Serbia prior to 1914. Serbia held a strong sense of nationalism and expansion in light of its victory in the Balkan Wars and looked to challenge Austria-Hungary next. The Austrians too had annexed Bosnia which contained many Serbs and contributed to heightened tensions. Therefore it was imperialism and militarism that caused heavy tensions in Europe as a long term factor, and the assassination of the Archduke Franz Ferdinand that acted as a trigger.