As the Soviet-backed communist régimes in Afghanistan failed, the two movements became part of the Northern Alliance, and took Kabul in 1992, Rabbani becoming president. Hekmatyar eventually accepted the position of prime minister but fought against his allies, helping to devastate Kabul. When the Taleban movement swept across Afghanistan in 1996, Hekmatyar was once more brought into an Alliance government, but they fell within months, and he retreated to the hills.

With the anti-Taleban victories since September 2001, and the restoration of United Front (Northern Alliance) control in Kabul, Hekmatyar has been a less prominent figure, because Pakistan had previously switched support to the Taleban; other warlords have done more of the military manoeuvring. Since then it is alleged he had been cooperating with the Taleban and al-Qaida.