Sydney, Jan 08 (Agencies): A former inmate at the US military prison at Guantanamo Bay has dropped a lawsuit against the Australian Government that accused it of complicity in torture he suffered while in detention.

Mamdouh Habib reached an out-of-court settlement with the Government for an undisclosed sum, both parties said on Saturday.

Habib, an Australian citizen, was arrested in Pakistan in late 2001 and held for three years without charge before being returned to Australia in 2005.

An Egyptian-born Muslim immigrant, he was detained in Pakistan for 28 days after his arrest and interrogated by Americans.

He was transferred to Egypt, then six months later to the US military base at Bagram, Afghanistan, and then to the US prison for terrorism suspects at Guantanamo Bay, Cuba.

Habib has alleged he was beaten and given electric shocks by his captors while he was in Pakistan and Egypt, kept drugged and shackled, had his fingers broken, and was sexually molested.

He said Australian officials were present during parts of his ordeal.

He sued the Australian Government for what he said was its failure to uphold his rights as a citizen during his detention.

But the case was withdrawn after the settlement was reached in mid-December absolving the Australian Government of any responsibility for the alleged mistreatment.

"In reaching this settlement, the Government acted in the best interests of the commonwealth to avoid further protracted litigation and to enable our agencies to focus on their core responsibilities of protecting our national security," Attorney-General Robert McClelland's office said in a statement.

Habib told Australian media he had settled the case, but would not go into details. Habib has launched a separate legal bid to try to overturn a Government ban on him holding a passport.