While recovering, he was promoted to Major, graduated from Frunze Military Academy and assigned to command a mechanised infantry regiment located near the Afghan border. Knowing his own dislike of serving as an infantry commander, Khabarov accepted a demotion from Regiment Commander to Chief-of-Staff for a brigade in order to transfer back to the 56th Air Assault Brigade. He spent 11 months with his brigade from October 1984 to September 1985, when the supply convoy he was escorting was ambushed near Barikot. His vehicle was hit by an RPG, turning it upside down, and Khabarov was left with a broken collarbone, three fractured ribs and further injuries to his right hand. He was again treated in Kabul and at Tashkent military hospital. As he recovered, then President Mikhail Gorbachev signed the Geneva Accords, leading to the Soviet withdrawal from Afghanistan in 1989. Khabarov, saw this act as a direct betrayal of the friendly Afghani government headed by the pro-Soviet President Mohammad Najibullah.