For more than three years , Mamdouh Habib , an Egyptian-born Australian with a volatile temper and an intense devotion to radical Islam , was in American custody , transported from Pakistan to Afghanistan to Egypt to the prison at Guantanamo Bay .