Mikhail Gorbachev implemented new economic and political reforms in the Soviet Union called glasnost and perestroika, allowing more openness and economic changes. Relations improved between the US and USSR under Reagan and Gorbachev. They signed the INF Treaty in 1987 eliminating intermediate-range missiles in Europe. In 1988, the USSR withdrew from Afghanistan, ending a war supported by US aid to anti-Soviet mujahideen. The Iran-Contra affair involved Reagan administration officials facilitating arms sales to Iran and diverting the proceeds to illegally fund anti-communist Contra rebels in Nicaragua.