However, when the mujahideen leaders took up arms against each other and the civil war in Afghanistan started, he resigned from his post and forbade the troops loyal to him from taking part in the war. He remained in Pakistan and did his best to stop the war between Gulbuddin Hekmatyar, Burhanuddin Rabbani and Abdul Rasul Sayyaf.[6][7] In 1996, the Taliban took control of Afghanistan. Most of the Taliban leaders were students of Mohammad Nabi Mohammadi.[8] Mohammadi maintained a good relationship with the Taliban.[9]