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 Bismarck. He especially worked to hold Russia at Germany's side to avoid a two-front war with France and Russia. When Wilhelm II ascended to the throne as German Emperor (Kaiser), Bismarck was compelled to retire and his 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 signed a series of agreements with France, the Entente Cordiale, and in 1907, the United Kingdom and Russia signed the Anglo-Russian Convention. While these agreements did not formally ally the United Kingdom with France or Russia, they made British entry into any future conflict involving France or Russia probable, and the system of interlocking bilateral agreements became known as the Triple Entente.
German industrial and economic power had grown greatly after unification and the foundation of the Empire in 1871. 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 Admiral Alfred von Tirpitz, in rivalry with the British Royal Navy for world naval supremacy. As a result, each nation strove to out-build the 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 rival. The arms race between Britain and Germany eventually extended to the rest of Europe, with all the major powers devoting their industrial base to producing 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 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 month of diplomatic manoeuvring among Austria-Hungary, Germany, Russia, France, and Britain called the July Crisis. Wanting to finally end Serbian interference in Bosnia, Austria-Hungary delivered the July Ultimatum to Serbia, a series of ten demands intentionally made unacceptable, intending to provoke a war with Serbia. When Serbia agreed to only eight of the ten demands, Austria-Hungary declared war 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, resentful of the German conquest of Alsace-Lorraine during the Franco-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.