The First World War was caused by rising nationalism, imperialism, militarism, and a complex system of alliances that drew European powers into conflict. While the U.S. initially remained neutral, unrestricted German submarine warfare and the Zimmerman Telegram drew America into the war in 1917 on the side of the Allies. The addition of American troops and resources helped tip the balance in favor of the Allies, leading to the defeat of Germany and the signing of the Treaty of Versailles in 1919. However, the harsh treaty terms humiliated Germany and failed to achieve a lasting peace in Europe.