On December 11, 1991 Barshadly was replaced by Tajeddin Mehdiyev, and appointed the Deputy Minister of Defense and Chief of General Staff of Azerbaijani Armed Forces. During his term as Chief of Staff, Azerbaijani army has achieved successful military victories on the Karabakh front. He also prevented the ammunition from being destroyed when the remaining Soviet army was pulling out of Azerbaijan in 1992.