In the 19th century, the major European powers had gone to great lengths to maintain a balance of power throughout Europe, resulting by 1900 in a complex network of political and military alliances throughout the continent. These had started in 1815, with the Holy Alliance between Prussia, Russia, and Austria. Then, in October 1873, German Chancellor Bismarck negotiated the League of the Three Emperors (German: Dreikaiserbund) between the monarchs of Austria–Hungary, Russia and Germany. This agreement failed because Austria–Hungary and Russia could not agree over Balkan policy, leaving Germany and Austria–Hungary in an alliance formed in 1879, called the Dual Alliance. This was seen as a method of countering Russian influence in the Balkans as the Ottoman Empire continued to weaken. In 1882, this alliance was expanded to include Italy in what became the Triple Alliance.
After 1870, European conflict was averted largely through a carefully planned network of treaties between the German Empire and the remainder of Europe orchestrated by Chancellor Bismarck. He especially worked to hold Russia at Germany's side to avoid a two-front war with France and Russia. With the ascension of Wilhelm II as German Emperor (Kaiser), Bismarck's system of alliances was gradually de-emphasised. For example, the Kaiser refused to renew the Reinsurance Treaty with Russia in 1890. Two years later, the Franco-Russian Alliance was signed to counteract the force of the Triple Alliance. In 1904, the United Kingdom sealed an alliance with France, the Entente cordiale and in 1907, the United Kingdom and Russia signed the Anglo-Russian Convention. This system of interlocking bilateral agreements formed the Triple Entente.
German industrial and economic power had grown greatly after unification and the foundation of the empire in 1870. From the mid-1890s on, the government of Wilhelm II used this base to devote significant economic resources to building up the Kaiserliche Marine (Imperial German Navy), established by AdmiralAlfred von Tirpitz, in rivalry with the British Royal Navy for world naval supremacy. As a result, both nations strove to out-build each other in terms of capital ships. With the launch of HMS Dreadnought in 1906, the British Empire expanded on its significant advantage over its German rivals. The arms race between Britain and Germany eventually extended to the rest of Europe, with all the major powers devoting their industrial base to the production of the equipment and weapons necessary for a pan-European conflict. Between 1908 and 1913, the military spending of the European powers increased by 50 percent.
Austria-Hungary precipitated the Bosnian crisis of 1908–1909 by officially annexing the former Ottoman territory of Bosnia and Herzegovina, which it had occupied since 1878. This greatly angered the Kingdom of Serbia and its patron, the Pan-Slavic and Orthodox Russian Empire. Russian political manoeuvring in the region destabilised peace accords that were already fracturing in what was known as "the Powder keg of Europe".
In 1912 and 1913, the First Balkan War was fought between the Balkan League and the fracturing Ottoman Empire. The resulting Treaty of London further shrank the Ottoman Empire, creating an independent Albanian State while enlarging the territorial holdings of Bulgaria, Serbia, Montenegro and Greece. When Bulgaria attacked both Serbia and Greece on 16 June 1913, it lost most of Macedonia to Serbia and Greece and Southern Dobruja to Romania in the 33-day Second Balkan War, further destabilising the region.
On 28 June 1914, Gavrilo Princip, a Bosnian-Serb student and member of Young Bosnia, assassinated the heir to the Austro-Hungarian throne, Archduke Franz Ferdinand of Austria in Sarajevo, Bosnia. This began a period of diplomatic manoeuvring between Austria-Hungary, Germany, Russia, France and Britain called the July Crisis. Wanting to end Serbian interference in Bosnia conclusively, Austria-Hungary delivered the July Ultimatum to Serbia, a series of ten demands which were intentionally unacceptable, made with the intention of deliberately initiating a war with Serbia. When Serbia acceded to only eight of the ten demands levied against it in the ultimatum, Austria-Hungary declared war on Serbia on 28 July 1914. Strachan argues "Whether an equivocal and early response by Serbia would have made any difference to Austria-Hungary's behaviour must be doubtful. Franz Ferdinand was not the sort of personality who commanded popularity, and his demise did not cast the empire into deepest mourning".
The Russian Empire, unwilling to allow Austria–Hungary to eliminate its influence in the Balkans, and in support of its longtime Serb protégés, ordered a partial mobilisation one day later. When the German Empire began to mobilise on 30 July 1914, France, sporting significant animosity over the German conquest of Alsace-Lorraine during theFranco-Prussian War, ordered French mobilisation on 1 August. Germany declared war on Russia on the same day. The United Kingdom declared war on Germany, on 4 August 1914, following an "unsatisfactory reply" to the British ultimatum that Belgium must be kept neutral.