In 1871, the German Empire was formed from Prussia. During the remaining thirty years of the nineteenth century (the longest era of peace Europe had seen for centuries), two major armed camps were created. Firstly was the Triple Alliance, formed by Germany, Austria-Hungary, and Italy. France and Russia formed an alliance to combat the Central Powers, as they became known. In 1907, Britain joined this alliance to create the Triple Entente.
On 28 June 1914, Archduke Franz Ferdinand visited Sarajevo with his wife. During this visit, a bomb was thrown at the vehicle but did not kill either person. When he learned that some Austrian officers had been injured by the bomb, he asked his driver to drive to the hospital where they were being treated. The driver took a wrong turn and Gavrilo Princip emerged from the crowd and fired two revolver shots that killed the Archduke and his wife. Austria-Hungary believed neighboring Serbia to be behind the attack, and delivered an ultimatum to stop all Serb propaganda against Austria and to allow officials in to conduct an investigation. Serbia accepted all terms except the latter, and Austria declared war a month later.
Serbia was Russia's ally, and Germany warned Russia that any mobilisation in support of Serbia would be countered by German mobilization. When Austria launched artillery fire on Serbia, however, Russia declared war, and Germany declared war against Russia in turn. Fearing a two-front war, Germany decided to first strike France before dealing with Russia. When France began to mobilize its forces (they saw this as an opportunity to recapture the regions of Alsace and Lorraine from Germany, who had taken them in 1870), it was enough for Germany to launch its own attack on France, using Belgium as elbow room.
Britain did not want to be involved at first, though it knew that an all-powerful Germany on the Continent would not be in her best interests. Britain invoked an old treaty with Belgium and delivered an ultimatum to Germany, warning her to exit Belgium immediately. Germany dubbed the ultimatum 'a mere scrap of paper', and Britain also found herself at war.