Most accounts of World War II in the Pacific tend to overlook an important fact: Japan did not sue for peace immediately after the first atomic bomb was dropped on Hiroshima. It took two atomic bombs — and the Soviet invasion of Manchuria — to finally end the conflict.

August 9 marks the anniversary of the atomic bombing of Nagasaki. While the attack is treated as an afterthought by historians, it is worth examining why the coup de grâce was necessary in light of the continued belief that Japan’s surrender was inevitable before the first atomic bomb was even dropped.

Historians broadly agree that, by 1945, Japan’s leaders knew they could not win the war but still felt they could avoid losing it by inflicting so many casualties on the Americans that the U.S. government would seek a negotiated settlement to end the conflict.

Related: 75 years ago, a farm boy became a Medal of Honor hero with a flamethrower at Iwo Jima

The Japanese military had become so skilled at defense that U.S. troops would have to pay for every inch of ground with blood. Iwo Jima, where American casualties outnumbered the Japanese defenders, has become synonymous with deadly combat. Far less recognition has been afforded to Okinawa, where the U.S. military suffered the most casualties of the entire Pacific campaign.

From late March until the end of June 1945, more than 12,000 U.S. soldiers, sailors, and Marines were killed at Okinawa. The dead included Army Lt. Gen. Simon Bolivar Buckner Jr., the highest-ranking U.S. military officer killed during the war. Nearly half of the American fatalities were sailors: of the 1,300 U.S. and 50 British ships that took part in the operation, 36 allied vessels were sunk and more than 350 others were damaged by Japanese Kamikaze attacks. The Japanese lost 100,000 troops and another 100,000 civilians, many of whom were forced to commit suicide by their supposed defenders.

What this gruesome toll shows is that Japan was a nation prepared to die in the summer of 1945. Unlike the invasion of Normandy, the Japanese had anticipated where U.S. troops would land troops to begin Operation Downfall, the planned invasion of Japan that was scheduled for November 1945. The Japanese home islands dwarfed the previous objectives in the island-hopping campaign, so many more U.S. and Japanese troops would have fought each other at Kyushu than at Okinawa.

Related: ‘It wasn’t enjoyable at all’ — How a civilian photographer shot some of the bloodiest battles of WWII

It goes without saying that Japan’s leaders did not feel they were defeated before the Enola Gay took off from the island of Tinian on Aug. 6, 1945, to launch the first atomic attack in the history of warfare. But not even the hellish blast of the Little Boy uranium bomb was enough to persuade Japan’s top military leaders that further resistance was pointless. The destruction of Nagasaki three days later is a direct result of their failure to comprehend that Japan had no defenses against atomic weapons.

This is why the B-29 Bock’s Car had to drop the plutonium bomb Fat Man on Japan – a mission that nearly ended in disaster several times.

Chris Wallace, host of Fox News Sunday, details in his book Countdown 1945 how just about everything went wrong with the Nagasaki mission. The plane’s weaponeer almost set off the bomb in mid-air; the B-29 had to divert to Nagasaki because of cloud cover over its primary target, Kokura; once over Nagasaki, the clouds parted just long enough for the Bock’s Car to drop Fat Man, which missed its aiming point by nearly two miles; and the plane had just enough fuel to make a dicey landing at Okinawa.

Related: Meet the only man to witness all three atomic blasts of World War II

It was messy, but events were to prove that the Nagasaki mission was hardly redundant. The Japanese Supreme Council for the Direction of the War had been meeting on Aug. 9 following the attack on Hiroshima and the Soviet invasion of Manchuria when word came that Nagasaki had been hit by a second atomic bomb.

Despite those three tectonic shifts in the conflict, Japan’s military chiefs insisted that the country fight on. It was Emperor Hirohito himself who broke the deadlock between the military and civilian leaders in Japan’s cabinet and decided to surrender — even then, junior military officers launched a failed coup in an attempt to destroy the recordings of Hirohito’s speech to the Japanese people announcing the surrender.

As we pause to remember the victims of the second — and last — nuclear attack, please also remember that avoiding the invasion of Japan in 1945 is one of the unsung miracles of the 20th Century. The first atomic bomb may have signaled a new era of warfare, but it was the second that saved countless members of the Greatest Generation from an invasion of Japan — including my grandfather, Navy Lt. John W. Duff. Had the invasion taken place, I would not be here to write this column.

The latest on Task & Purpose