After the fall of the communist government of Afghanistan and the start of the government of Burhanuddin Rabbani, Farhadi served as Afghanistan's ambassador to the United Nations. Farhadi presented his credentials as Ambassador Permanent Representative of Afghanistan to the United Nations Secretary General Boutros Boutros Ghali on 30 April 1993. Even when the Taliban had taken control of most of Afghanistan, the government of Burhanuddin Rabbani continued to represent Afghanistan at the United Nations, with Farhadi as the UN Ambassador representing Afghanistan until the end of 2006. The Taliban, in spite of the strong support of Pakistan, never represented Afghanistan in the United Nations.