Shipments of Soviet armaments to Cuba were causing growing concern in the United States in the summer of 1962. On September 4, President Kennedy noted the presence of SAM-2 anti-aircraft missiles and warned the Soviets against adding offensive missiles. The Soviets (September 11) assured Kennedy that they had no such intentions.
When the US discovered (October 14) the presence of nearly operational Soviet IRBM and MRBM sites in Cuba, Kennedy instituted a selective naval blockade ("quarentine") of Cuba, demanded the removal of the missiles, and threatened further military action if the Soviets did not comply. Two days later some Soviet ships heading for Cuba changed course, although the Soviets continued work on the installations in place.
The Soviets offered (October 26) to remove the missiles in exchange for a US pledge not to invade Cuba and, in a more strongly worded message on the next day, a US pledge to remove the US missiles in Turkey. That day the US wired a response to the Soviets accepting the original conditions, while Robert Kennedy delivered a carrot-and-stick ultimatum to Soviet Ambassador Dobrynin: The Soviets had 24 hours to agree to remove the missiles in return for a US no-invasion pledge and private assurances that the US missiles in Turkey would be removed. Otherwise, the US would forcibly remove the missiles. Khrushchev accepted the terms the next day.
The removal of the missiles began on November 7. The blockade was lifted on the 20th, when the Soviets also agreed to remove all IL-28 medium range bombers based in Cuba.