During a century of peace the contradictions between European countries accumulated and erupted in a murderous international conflict. The main factors which triggered the war were militant nationalism and the disruption of the balance of power.
The 19th century witnessed a number of armed conflicts which left deep scars in international relations. For instance, the Franco-Prussian war of 1870-1871 which led to creation of the German Empire made the two nations irreconcilable foes: France dreamed of revenge to return annexed Alsace and Lorraine and Germans had to be ready for a retaliatory strike from the West. The Russian Empire humiliated in Crimea in 1853-56, first denied its support to France in 1870, and then defeated the Ottoman Empire in the bloody war of 1877-78 which resulted in creation of new independent states of Serbia, Romania and Montenegro. But at the Congress of Berlin the Austro-Hungarian Empire and Britain with German support deprived Russia of any political benefits of its victory fearing Russian influence in the Balkans. The Tsar, who dreamed to control the straits leading from the Black Sea to the Mediterranean Sea and to take under his scepter the newly liberated South Slav peoples was deeply offended and started to look for alliances capable to counterweight Austro-German dictate.
The Austro-Hungarian interests in the Balkans were in direct contradiction with Russian intentions in this area and this competition for influence and territories transformed the two countries into bitter opponents. In this conflict, Bismarck steadily supported Austria-Hungary and concluded with it the Dual Alliance in 1879. Russia reacted by rapprochement with France and in 1892 the two states signed the military treaty promising to defend each other in case of German attack. Meanwhile Britain was concerned by quick growth of German industrial production representing serious menace for British trade and worried by accelerated rearmament and naval build up launched by Kaiser William II. Realising that Germany was its main competitor on the international arena, Britain started to improve relations with France signing with it the Entente Cordiale in 1904 to eliminate all contradictions on colonial possessions and with Russia dividing with it the zones of influence in Persia and Afghanistan in 1907. The tsar, defeated by Japan in 1905, was also in search of British support.
The first Moroccan Crisis of 1905 considerably increased tensions between Germany and France, supported by Britain. The situation in the Balkans was also very tense because different peoples living there strived for national independence. Russia encouraged claims of the South Slavs and Austria-Hungary resisted to any changes of the status quo. Serbia, with Russian support, dreamed to unite all Balkan Serbs and the Habsburg Empire strongly opposed to these plans. The instability and weakness of the Ottoman Empire tempted the Tsar to take possession of the straits of Constantinople and the emerging Balkan states to seize the remaining Turkish territories in Europe.
In 1908, immediately after the declaration of Bulgarian independence, Austria-Hungary annexed Bosnia and Herzegovina (formally remaining in Turkish hands). This violation of the Congress of Berlin agreements enraged Russia and pushed Serbia to mobilize its army. The Habsburg armed forces also mobilized and the war was avoided only because the tsar did not dare to start hostilities without French and British support. Meanwhile the second Moroccan Crisis of 1911 opposed France to the German Empire loudly claiming its rights to African colonies. The Kaiser badly needed overseas possessions rich in natural resources and felt strong enough to require his fair part of the colonial pie. German claims forced France and Britain to join efforts in protection of their imperial interests. In 1912, Serbia, Bulgaria, Montenegro and Greece forming the Balkan League attacked Turkey and annexed sizable portions of its European territories. These new acquisitions were legalized by the London Treaty of 1913 but Bulgaria remained unsatisfied by the partition of the Ottoman spoils and the same year declared war to Greece and Serbia. The Second Balkan War ended by quick Bulgarian defeat and the emergence of the stronger and more ambitious Serbian state. These developments worried the Habsburg Empire which feared unrest of its Slav subjects in newly acquired Bosnia and Herzegovina.
In such a way, by 1914, the main powers of Europe formed two competing coalitions with conflicting interests: the Triple Alliance included German Empire, Austro-Hungarian Empire and Italy and the Triple Entente consisted of France, British Empire and Russian Empire. Both alliances were involved in frantic arms race and developed aggressive plans. In this explosive situation the killing of the Archduke Francis Ferdinand committed by Serbian nationalists in the capital of Bosnia, Sarajevo on June 28, 1914, triggered the crisis which led to the First World War. Eager to smash its disturbing neighbor the Austro-Hungarian diplomacy backed by Germany accused Serbia of the assassination of the Habsburg heir and on July 23 presented to Serb officials an unacceptable ultimatum. Demonstrating its support to Serbia, Russia put its army on alert but Austria-Hungary declared war on Serbia and started hostilities. The tsar ordered full mobilisation against the Habsburg Empire and was immediately followed by Germans who in accordance with the Schlieffen Plan harried to defeat France before Russia could interfere in order to prevent war on two fronts. The Kaiser William II declared war on Russia on August 1 and on France on August 3 after that, his troops rushed through Belgium to the French territory. Offended by violation of Belgian neutrality and tied by allied obligations, Britain declared war on Germany on August 4, 1914.
In such a way, gradual accumulation of tensions caused by conflicting interests of the European powers united in two rival military alliances finally erupted in the First World War. The Austro-Hungarian aggression against Serbia was enough to disturb the precarious balance of power in Europe.