The Cuban missile crisis was resolved when the United States promised never to invade Cuba and to dismantle its Jupiter missiles in Italy and Turkey in exchange for the removal of the Soviet missiles in Cuba. The latter half of the agreement was secret at the time and was only revealed years after the crisis ended. The resolution occurred mere days before military action would have escalated the crisis.
Early in the crisis, President Kennedy's advisers pressed for air strikes to take out the missiles in Cuba. Kennedy was reluctant, however, due to the potential for escalating the conflict and inviting reprisals from Germany. After diplomatic efforts showed little success, the United States instituted a blockade, preventing any ships carrying weapons from reaching Cuban shores. Ultimately, both countries returned to the negotiations through back-channel communications, resolving the crisis peacefully.
The blockade in the Atlantic proved to be the most dangerous moment in the crisis. Upon discovering a Soviet submarine attempting to escort a ship through the line, the U.S. Navy launched warning-depth charges at the vessel in an attempt to get it to surface or turn back. The captain of the submarine, however, had a nuclear-tipped torpedo and permission to fire it if he was fired upon. When the depth charges began to explode, the officers had a heated argument whether or not to fire back. Ultimately, they could not agree to fire the torpedo, and their disagreement potentially averted a global nuclear war.