This is a very simplified overview of the events which led the British government to declare war on Germany on 4 August 1914.
One of the aims of British foreign policy in the early 20th century was to ensure no country should gain dominance in Europe. But by 1907 it was clear that Germany was growing in ascendancy – economically, politically and militarily – potentially posing a threat to Britain’s global Empire and world position. As a result, in that year, Britain joined the Franco-Russian Double Entente alliance, to form the Triple Entente. This split Europe into two main blocks, with Germany, Austria-Hungary and Italy, linked by their Triple Alliance, on the opposing side to the Triple Entente.
On 28 June 1914 in Sarajevo, Bosnian-Serb Nationalist Gavrilo Princip shot dead the heir to the Austro-Hungarian throne, Archduke Franz Ferdinand. With German encouragement, Austria-Hungary declared war on Serbia on 28 July 1914. The crisis escalated, as the web of alliances resulted in Russia being drawn in to support their Serbian allies, whilst in turn Germany weighed in on the side Austria-Hungary, declaring war on Russia on 1 August and France on 3 August. Within hours France declared war on Germany.
Britain now faced the very real threat of German dominance if she should defeat Russia and France. But the government still agonised at what course of action to take.
It is here that the 1839 Treaty of London came into play. Under it, Britain was bound to defend Belgium if she was ever invaded. Germany knew this, and requested that Belgium give its troops free passage in order to invade France. Belgium refused. Germany ignored this refusal, enacted the Schlieffen Plan and violated Belgium’s neutrality on 4 August, entering France via that route.
However, even now, Germany still hoped that Britain would remain neutral. For Britain, though, this brought the German threat even closer, with the proximity of the Belgian ports (and German navy) to the British coast. The German invasion of Belgium in effect tipped the balance.
At 2pm on 4 August British Foreign Secretary Sir Edward Grey telegraphed an ultimatum to Berlin, requesting the German government to make assurances that it would respect Belgian neutrality as guaranteed by the 1839 Treaty of London. A reply was requested by 11pm (midnight Berlin time). The ultimatum expired, and at 11pm on 4 August 1914 the British government declared war on Germany.