The Cold War was a period of geopolitical tension and proxy wars between the Soviet Union and the United States from 1945 to 1990. Key events included the division of Germany and Berlin, the formation of opposing military alliances like NATO and the Warsaw Pact, the Cuban Missile Crisis that brought the two sides closest to nuclear war, and a technological and ideological competition known as the Space Race. The Cold War ended in the late 1980s with reforms in the Soviet Union under Gorbachev and the eventual collapse of Soviet communism.