Arrested after the 9/11 attacks in 2001 during a trip to Pakistan and Afghanistan, Habib was interrogated there by Pakistani and the United States CIA agents before being shipped by extraordinary rendition to Egypt, where he was held for six months and interrogated more under torture. The CIA transferred him back to a black site in Afghanistan for more torture and interrogation, then to US military custody. In 2002 Habib was transferred to the Guantanamo Bay detention camp.