After the formation of the Islamic Republic of Afghanistan in December 2004, Saleh was appointed as head of the National Directorate of Security (NDS) by President Hamid Karzai.[1][2] Saleh initiated structural reforms and helped rebuild the Afghan intelligence service.[11] Saleh and former interior minister Hanif Atmar were viewed by the international community as two of the most competent cabinet members in the Afghan government.[11] A western security expert told The Guardian that both men had a reputation for "clearing corruption within" their organs.[12]