The United States detonated two nuclear weapons over the Japanese cities of Hiroshima and Nagasaki on August 6 and 9, 1945, respectively, with the consent of the United Kingdom, as required by the Quebec Agreement. The two bombings killed between 129,000 and 226,000 people, most of whom were civilians, and remain the only use of nuclear weapons in armed conflict.
In the final year of the war, the Allies prepared for a very costly invasion of the Japanese mainland. This undertaking was preceded by a conventional and firebombing campaign which devastated 67 Japanese cities. The war in Europe had concluded when Germany signed its instrument of surrender on May 8, 1945, and the Allies turned their full attention to the Pacific theater. The Allies called for the unconditional surrender of the Imperial Japanese armed forces in the Potsdam Declaration on July 26, 1945, the alternative being "prompt and utter destruction". Japan ignored the ultimatum and the war continued.
By August 1945, the Allies' Manhattan Project had produced two types of atomic bombs, and the 509th Composite Group of the United States Army Air Forces (USAAF) was equipped with the specialized Silverplate version of the Boeing B-29 Superfortress that could deliver them from Tinian in the Mariana Islands. The Allies issued orders for atomic bombs to be used on four Japanese cities on July 25. On August 6, one of the modified B-29s dropped a uranium gun-type bomb ("Little Boy") on Hiroshima. Another B-29 dropped a plutonium implosion bomb ("Fat Man") on Nagasaki three days later. The bombs immediately devastated their targets. Over the next two to four months, the acute effects of the atomic bombings killed between 90,000 and 146,000 people in Hiroshima and 39,000 and 80,000 people in Nagasaki; roughly half of the deaths in each city occurred on the first day. Large numbers of people continued to die for months afterward from the effects of burns, radiation sickness, and other injuries, compounded by illness and malnutrition. In both cities, most of the dead were civilians, although Hiroshima had a sizable military garrison.
Japan surrendered to the Allies on August 15, six days after the Soviet Union's declaration of war and the bombing of Nagasaki. The Japanese government signed the instrument of surrender on September 2 in Tokyo Bay, which effectively ended World War II. Scholars have extensively studied the effects of the bombings on the social and political character of subsequent world history and popular culture, and there is still much debate concerning the ethical and legal justification for the bombings.