 The first half of the Soviet contingent was withdrawn from May 15 to August 16, 1988, and the second from November 15 to February 15, 1989.In order to ensure a safe passage the Soviets had negotiated ceasefires with local mujahideen commanders, so the withdrawal was generally executed peacefully, except for the operation "Typhoon".General Yazov, the Defense Minister of Soviet Union, ordered the 40th Army to violate the agreement with Ahmed Shah Masood, who commanded a large force in the Panjshir Valley, and attack his relaxed and exposed forces.