Before the beginning of the Second World War, Japan was fighting with China. This is called Second Sino-Japanese War (1937-1945). According to the United States government's Department of State's Office of the Historian, the US did nothing to help China against the Japanese from 1937 to 1940 when Japan and China were engaged in total war. US officials and policymakers did not want to help. Japan's military obtained the majority of its iron, steel and oil from the United States between 1937 and 1940. The treaty of commerce between the United States and Japan continued until January 1940 and even then the United States did not embargo Japan right away. The United States only began giving aid to China after 1940 when Japan and China already fought for three years. When the Second World War broke out in 1939, Japan went to the side of Nazi Germany and Fascist Italy. Japanese planes attacked Pearl Harbor on December 7, 1941. The fighting continued for 4 years. When the USA dropped the first atomic bombs on the Japanese cities of Hiroshima and Nagasaki, Japan accepted defeat and surrendered in 1945.