World War II ended in two stages: the total destruction of the German government in Berlin in May 1945 and the capitulation of the Japanese government four months later. In each case, the victorious Allies accepted the unconditional surrender of the Axis nations' land, sea and air forces, as well as a political surrender of their civil governments.
Germany surrendered first. In April 1945, with hundreds of thousands of Soviet soldiers fighting toward the Reich Chancellery, Adolf Hitler took his own life in a fortified bunker complex beneath the building. After Hitler's death, what was left of the German state was administered by Grand Admiral Karl Dönitz of the German Navy. His brief term ended with his arrest in the temporary capital of Flensburg on May 23. The surviving leaders of the Third Reich were put on trial at Nuremberg, and many of them were eventually executed.
Japan formally surrendered to the Allies on Sept. 2, 1945, aboard the USS Missouri, which was then docked in Tokyo Harbor. American histories tend to credit the atomic bombings of Hiroshima and Nagasaki for the Japanese decision to surrender, though Japanese and Russian scholarship credit the Soviet Union's Aug. 8 declaration of war and subsequent attack on Manchuria for the final breakdown in the Japanese war effort.