Soviet Union in less than two years. In an attempt to avoid a third short-lived leader, in 1985, the Soviets turned to the next generation and selected Mikhail Gorbachev. Gorbachev made significant changes in the economy and party leadership, called "perestroika". His policy of "glasnost" freed public access to information after decades of heavy government censorship. Gorbachev also moved to end the Cold War. In 1988, the Soviet Union abandoned its nine-year war in Afghanistan and began to withdraw its forces. In the late 1980s, , which paved the way for Revolutions of 1989. With the tearing down of the Berlin Wall
Mikhail Gorbachev the Alma-Ata Protocol which formally established the CIS. They also preemptively accepted Gorbachev's resignation. When Gorbachev learned what had transpired, he told CBS that he would resign as soon as he saw that the CIS was indeed a reality. On the night of 25 December, in a nationally televised speech, Gorbachev announced his resignation as president—as he put it, "I hereby discontinue my activities at the post of President of the Union of Soviet Socialist Republics." He declared the office extinct and handed over its functions—including control of the Soviet nuclear codes—to Yeltsin. That same night after he left office,