Tensions between the Soviet Union and the United States reached an all-time high during the 1962 Cuban Missile Crisis, in which Soviet missiles were placed on the island of Cuba well within range of US territory as a response to the failed Bay of Pigs Invasion and to deter more US attacks. This was retrospectively viewed as the closest the world ever came to a nuclear war. After the crisis was resolved, relations with the United States gradually eased into the 1970s, reaching a degree of détente as both Moscow and Beijing sought American favor.