The key causes of World War 1 included alliances between countries, nationalism in various European nations, imperialism and competition for land and resources, and militarism as countries built up their armed forces. Major powers on opposing sides included the Allied forces of Great Britain, France, Russia, and later the U.S. against the Central Powers of Germany and Austria-Hungary. The U.S. initially entered the war in 1917 due to German attacks on passenger ships carrying Americans and its resumption of unrestricted submarine warfare. The war was largely fought in trenches and involved new industrialized weapons and tactics. It ended in 1918 with Allied victories on the Western Front and the surrender of Germany.