<P> At the Yalta agreement, the US, the UK, and the USSR had agreed that the USSR would enter the war on Japan within three months of the defeat of Germany in Europe . This Soviet--Japanese War led to the fall of Japan's Manchurian occupation, Soviet occupation of South Sakhalin island, and a real, imminent threat of Soviet invasion of the home islands of Japan . This was a significant factor for some internal parties in the Japanese decision to surrender to the US and gain some protection, rather than face simultaneous Soviet invasion as well as defeat by the US . Likewise, the superior numbers of the armies of the Soviet Union in Europe was a factor in the US decision to demonstrate the use of atomic weapons to the USSR, just as the Allied victory in Europe was evolving into division of Germany and Berlin, the division of Europe with the Iron Curtain and the subsequent Cold War . </P> <P> Having ignored (mokusatsu) the Potsdam Declaration, the Empire of Japan surrendered and ended World War II, after the atomic bombings of Hiroshima and Nagasaki and the declaration of war by the Soviet Union . In a national radio address on August 15, Emperor Hirohito announced the surrender to the Japanese people by Gyokuon - hōsō . A period known as Occupied Japan followed after the war, largely spearheaded by United States General of the Army Douglas MacArthur to revise the Japanese constitution and de-militarize Japan . The Allied occupation, with economic and political assistance, continued well into the 1950s . Allied forces ordered Japan to abolish the Meiji Constitution and enforce the Constitution of Japan, then rename the Empire of Japan as Japan on May 3, 1947 . Japan adopted a parliamentary - based political system, while the Emperor changed to symbolic status . </P> <P> American General of the Army Douglas MacArthur later commended the new Japanese government that he helped establish and the new Japanese period when he was about to send the American forces to the Korean War: </P> <P> The Japanese people, since the war, have undergone the greatest reformation recorded in modern history . With a commendable will, eagerness to learn, and marked capacity to understand, they have, from the ashes left in war's wake, erected in Japan an edifice dedicated to the supremacy of individual liberty and personal dignity; and in the ensuing process there has been created a truly representative government committed to the advance of political morality, freedom of economic enterprise, and social justice . Politically, economically, and socially Japan is now abreast of many free nations of the earth and will not again fail the universal trust...I sent all four of our occupation divisions to the Korean battlefront without the slightest qualms as to the effect of the resulting power vacuum upon Japan . The results fully justified my faith . I know of no nation more serene, orderly, and industrious, nor in which higher hopes can be entertained for future constructive service in the advance of the human race . </P>

Who was japan at war with in world war 2