World War II lasted from 1939 to 1945 and involved many European and Asian countries. Germany was unhappy with the Treaty of Versailles after WWI and secretly rebuilt its military under Hitler. The League of Nations failed to prevent the war. Technological and scientific advances during the war laid the foundations for modern technology. European weakness after the war allowed former colonies in Asia to gain independence. The United Nations was formed to maintain international peace and security.