A man described as an ASIO agent stood by as a naked US marine wearing a condom threatened Mamdouh Habib with rape, the former Guantanamo Bay inmate alleges.
In a book to be published next week, Mr Habib says he saw the words "Allah Akbar"’ [God is great] written on the condom to compound his humiliation.
The claims are detailed in My Story, excerpts of which will appear in Good Weekend tomorrow.
The book includes Mr Habib’s first explanation of why he was in Afghanistan before the September 11 attacks.
Australian intelligence agencies have long accused Mr Habib of training with al-Qaeda during that period but Mr Habib says he fled to Afghanistan some weeks before the attacks after Pakistani police had abducted him and shot one of his companions while they were on a business trip.
Mr Habib recounts in excruciating detail the torture he says he was subjected to by Pakistani and Egyptian security agencies after his arrest in early October 2001, and describes the grim reality of life in Guantanamo Bay, where he was subsequently imprisoned.
The book rejects the repeated assurances the Howard government gave that Mr Habib was well treated during his years in the US prison.
In the book Mr Habib alleges: