The early 20th century saw a brief period of "Taisho democracy" overshadowed by the rise of Japanese expansionism. World War I enabled Japan, which fought on the side of the victorious Allies, to expand its influence in Asia, and its territorial holdings in the Pacific. In 1936, however, Japan signed the Anti-Comintern Pact, joining with Germany and Italy to form the Axis alliance. During this period, Japan invaded China, occupying Manchuria in 1931, and continued its expansion into China proper in 1937, starting the Second Sino-Japanese War, which lasted until the end of World War II. In 1941, after US President Franklin D. Roosevelt demanded that Japan withdraw its forces from China, Japan attacked the United States naval base in Pearl Harbor as well as British and Dutch colonies in Southeast Asia, bringing itself and the United States into World War II. After a long campaign in the Pacific Ocean, Japan lost its initial territorial gains, and American forces moved close enough to begin strategic bombing of Tokyo, Osaka, and other major cities, as well as the atomic bombings of Hiroshima and Nagasaki. The Japanese eventually agreed to an unconditional surrender to the Allies on August 15, 1945 (V-J Day). The Tokyo War Crimes Tribunal was convened on May 3, 1946 to prosecute Japanese war crimes, including atrocities like the Nanking Massacre. Emperor Hirohito, however, was given immunity and retained his title.
The war cost millions of lives in Japan and other countries, especially in East Asia, and left much of the country's industries and infrastructure destroyed. Official American occupation lasted until 1952, although U.S. forces still retain important bases in Japan, especially in Okinawa. In 1947, Japan adopted a new pacifist constitution, seeking international cooperation and emphasizing human rights and democratic practices.
After the occupation, under a program of aggressive industrial development and U.S. assistance, Japan achieved spectacular growth to become one of the largest economies in the world. Despite a major stock market crash in 1990, from which the country is recovering gradually, Japan remains a global economic power today and is now bidding for a permanent seat on the United Nations Security Council.