Nationalism was an especially strong force in Europe's Balkan Peninsula, where several nationalist groups had won their independence from the Turkish Ottoman Empire since the 1820s.
From the early 1870s Germany sought an alliance with Austria-Hungary and Russia. This was because the German states had taken two provinces, Alsace and Lorraine from France during war and Germany feared that France wanted revenge.
In 1879 Germany created the Dual Alliance under which Germany and Austria-Hungary agreed that each would help the other if either was attacked by Russia.
The Dual Alliance became the Triple Alliance when Italy joined Germany and Austria-Hungary in 1882.
When Germany failed to renew their treaty with Russia, France and Russia became allies.
In 1894 France and Russia agreed to help each other if the other was attacked by Germany.
Britain signed the Entente Cordiale with France in 1904, as they were alarmed by Germany's move to severely build up the German Navy.
When Britain and Russia settled their differences in 1907, Britian, France and Russia linked up in the Triple Entante.
Many Serbs became angered when Austria took two Turkish Balkan provinces, Bosnia and Herzegovina, where Serbs took up much of the population.
On the 28th of June 1914, Archduke Franz Ferdinand, the heir to the Austrian throne, and his wife were assassinated by a Bosnian Serb.
On 23 July, Austria presented Serbia with an ultimatum. Austria knew that Serbia would never accept all the terms of the ultimatum, especially it's demand that Austrian troops be allowed to track down Serbian terrorists inside Serbia.
Serbia accepted many of the demands and offered to discuss others, but Austria proceeded to declare war on the 28th of July.
Russia mobilises it's troops to support it's ally Serbia.
After Russia mobilised its forces to defend Serbia, Germany declared war on Russia.
After France declared it would stand by its Russian ally, on the 3rd of August, Germany declared war against France.
Britain declares war on Germany in response to the invasion of neutral Belgium and in support of its ally Francw. Australia, New Zealand and Canada enter the war in support of Britain.
In return for promises of territory, Italy withdrew from the Triple Alliance and joined the Allies.
The United States of America joins the Allies in 1917.