In the beginning of his term, he approved the CIA's plan to invade Cuba. After the invasion turned out to be a failure, the Cuban Missile Crisis began. During the crisis, Cuba ordered a lot of nuclear missiles from the Soviet Union. It was the closest the world was to having a nuclear war. Kennedy ordered US Navy ships to surround Cuba. He ended the crisis peacefully by making an agreement with the Soviet Union. They agreed that the Soviet Union would stop selling nuclear weapons to Cuba. In return, the U.S. would take its missiles out of Turkey and promise to never invade Cuba again.