World War I was caused by militarism, alliances, imperialism, and nationalism in Europe leading up to 1914. The immediate trigger was the assassination of Archduke Franz Ferdinand of Austria by Serbian nationalists. This caused Austria-Hungary to declare war on Serbia and triggered a series of military alliances that drew other European powers into the war. The war became a stalemate as armies engaged in trench warfare with new industrial weapons such as machine guns and poison gas. Over 8.5 million troops were killed and over 21 million wounded or taken prisoner before Germany surrendered in 1918.