Mahmud Ahmed Lieutenant General Mahmud Ahmed ( HI ( M ) ) , is a veteran intelligence officer and a retired three - star general in the Pakistan Army who served as a director general of Inter - Services Intelligence ( ISI ) , the principal intelligence body of Pakistan . He along with other generals were successful in overthrowing the elected government of prime minister Nawaz Sharif , in the 1999 coup d ' état to bring General Pervez Musharraf to political power . He was serving as the Corp Commander of X Corps , Rawalpindi at that time . After the coup , General Mahmud was transferred as the Director General ISI , replacing Lieutenant General Ziauddin Butt , who was Sharif ' s choice to replace General Musharraf as the army chief before the coup . He himself was replaced by another career Army intelligence officer Lieutenant General Jamshed Gulzar Kayani ( of the 38th PMA Long Course ) as the Rawalpindi Corps Commander . Army career . Mahmud Ahmed was commissioned in the Pakistan Army in 1966 in the 37th PMA Long Course and was the regimental colleague of General Pervez Musharraf in the 16 SP ( Self - Propelled ) Regiment . In October 1995 , when Lt Gen Ali Kuli Khan Khattak was appointed Rawalpindi Corps Commander by then army chief General Abdul Waheed Kakar , Mahmud Ahmed took over from him as DGMI . Mahmud was promoted to Lieutenant General in June 1998 , and posted by General Jehangir Karamat , then COAS , as Commandant , National Defence College . On taking over as the COAS in October , 1998 , General Musharraf brought him as Commander X Corps replacing Lieutenant General Salim Haider who proceeded as Corps Commander Mangla . Mahmud was posted , after the coup , as DG ISI , in place of Lieutenant General Ziauddin Butt . Commander of Artillery Corps . Lt Gen Mahmud Ahmed was later nominated for the ceremonial post of Colonel Commandant of the Corps of Artillery at the Artillery Regimental Center on 17 March 2001 . He had replaced the outgoing colonel commandant Lieutenant General Saeed Uz Zafar . Mahmud was later replaced by Lt General Khalid Kidwai as the colonel commandant on 13 October 2004 . Mahmud visit to United States . General Mahmud was known to visit the United States regularly during his time as the head of ISI consulting senior officials in the U . S . administration in the weeks before and after 9 / 11 . In fact , he was with Republican Congressman Porter Goss and Democratic Senator Bob Graham in Washington , discussing Osama bin Laden over breakfast , when the attacks of September 11 , 2001 happened . He was immediately called into meetings with American officials where demands of Pakistani cooperation were made and he was told to convey this to the Pakistani government . Removal from ISI . On October 9 , 2001 , The Times of India reported that " US authorities sought his removal after confirming the fact that $ 100 , 000 were wired to WTC hijacker Mohamed Atta from Pakistan by Ahmad Umar Sheikh at the insistence of Gen . Mahmud " . Views on American War in Afghanistan . General Mahmud Ahmed opposed the US invasion of Afghanistan . He was retired from his role in the ISI on 8 October 2001 , just prior to the US invasion of Afghanistan . He was replaced by Lieutenant General Ehsan ul Haq as the Director General ISI . He is now a member of Tablighi Jamaat and preaching the teaching of Islam .