During the era of the weak emperor Taisho (1912-26), the political power shifted from the oligarchic clique (genro) to the parliament and the democratic parties.
In the First World War, Japan joined the Allied powers, but played only a minor role in fighting German colonial forces in East Asia. At the following Paris Peace Conference of 1919, Japan's proposal of amending a "racial equality clause" to the covenant of the League of Nations was rejected by the United States, Britain and Australia. Arrogance and racial discrimination towards the Japanese had plagued Japanese-Western relations since the forced opening of the country in the 1800s, and were again a major factor for the deterioration of relations in the decades preceeding World War 2. In 1924, for example, the US Congress passed the Exclusion Act that prohibited further immigration from Japan.
After WW1, Japan's economical situation worsened. The Great Kanto Earthquake of 1923 and the world wide depression of 1929 intensified the crisis.
During the 1930s, the military established almost complete control over the government. Many political enemies were assassinated, and communists persecuted. Indoctrination and censorship in education and media were further intensified. Navy and army officers soon occupied most of the important offices, including the one of the prime minister.
Already earlier, Japan followed the example of Western nations and forced China into unequal economical and political treaties. Furthermore, Japan's influence over Manchuria had been steadily growing since the end of the Russo-Japanese war of 1904-05. When the Chinese Nationalists began to seriously challenge Japan's position in Manchuria in 1931, the Kwantung Army (Japanese armed forces in Manchuria) occupied Manchuria. In the following year, "Manchukuo" was declared an independent state, controlled by the Kwantung Army through a puppet government. In the same year, the Japanese air force bombarded Shanghai in order to protect Japanese residents from anti Japanese movements.
In 1933, Japan withdrew from the League of Nations since she was heavily criticized for her actions in China.
In July 1937, the second Sino-Japanese War broke out. A small incident was soon made into a full scale war by the Kwantung army which acted rather independently from a more moderate government. The Japanese forces succeeded in occupying almost the whole coast of China and committed severe war atrocities on the Chinese population, especially during the fall of the capital Nanking. However, the Chinese government never surrendered completely, and the war continued on a lower scale until 1945.
In 1940, Japan occupied French Indochina (Vietnam) upon agreement with the French Vichy government, and joined the Axis powers Germany and Italy. These actions intensified Japan's conflict with the United States and Great Britain which reacted with an oil boycott. The resulting oil shortage and failures to solve the conflict diplomatically made Japan decide to capture the oil rich Dutch East Indies (Indonesia) and to start a war with the US and Great Britain.
In December 1941, Japan attacked the Allied powers at Pearl Harbor and several other points throughout the Pacific. Japan was able to expand her control over a large territory that expanded to the border of India in the West and New Guinea in the South within the following six months.
The turning point in the Pacific War was the battle of Midway in June 1942. From then on, the Allied forces slowly won back the territories occupied by Japan. In 1944, intensive air raids started over Japan. In spring 1945, US forces invaded Okinawa in one of the war's bloodiest battles.
On July 27, 1945, the Allied powers requested Japan in the Potsdam Declaration to surrender unconditionally, or destruction would continue. However, the military did not consider surrendering under such terms, partially even after US military forces dropped two atomic bombs on Hiroshima and Nagasaki on August 6 and 9, and the Soviet Union entered the war against Japan on August 8.
On August 14, however, Emperor Showa finally decided to surrender unconditionally.