Communist president Najibullah resigned on April 16, 1992. The guerrilla forces, headed by the Tajik war hero Ahmad Shah
Masoud, were advancing on Kabul. On April 28, the rebels gained control, ending fourteen years of Soviet-backed regimes. Since 1979, more than two million Afghans had been killed while six million had left the country.
Clashes between moderates and Islamic fundamentalist forces began to occur soon after the takeover. Each mujaheddin guerrilla leader wanted to succeed Najibullah. The mujaheddin leaders established a fifty-one member ruling council. The ruling council chose the interim president Sibghatullah Mujaddidi to run the government from April to June.
One of the Islamic factions, Hizbi Islamic Gulbuddin, led by Gulbuddin Hikmatyar would not participate in the new Islamic government. Hikmatyar maintained that too many of Najibul-lah's officers had been pardoned. Hikmatyar took his troops to the south and proceeded to attack Kabul. General Abdul Rashid Dostam, a defector from Najibullah's army and leader of the Hizbi Wahdat Islami, withdrew from the ruling council and also began to attack Kabul.
On June 28, 1992, Burhanuddin Rabbani, one of the guerrilla leaders and founder of the Jamiat-I Islami political party, became president. The mujaheddin had retaken Afghanistan from the political leaders who were backed by the Soviet Union. Although the Muslim fighters had conquered the capital, fierce fighting continued around Kabul and other places in the country. At least nine different rebel groups began fighting one another. An attempt at peace was made on March 7, 1993, when President Rabbani and Gulbuddin Hikmatyar signed an agreement. Hikmatyar was made prime minister designate.