The fight is over between the Australian government and former Guantanamo Bay prisoner David Hicks because the office of the public prosecution director dropped off the case against the self-confessed al Qaeda trainee.

The Director of Public Prosecutions (DPP) dropped the case a year after it sought to prevent Mr Hicks from cashing in on his personal memoir 'Guantanamo: My Journey', arguing that proceeds from the books should be regarded as being sourced from criminal activities.

The DPP said in its case that Mr Hicks owned up to the terror charges that the United States had brought up against him shortly after his arrests in Afghanistan on 2001.

But lawyers for Mr Hicks informed the Commonwealth that his guilty plea before U.S. authorities was only entered to win back his freedom after five years of incarceration.

His legal team also submitted evidences that suggested the circumstances of Mr Hicks' admission of guilt was largely influenced by "instances of severe beatings, sleep deprivation and other conditions of detention that contravene international human rights norms," as reported on Tuesday by The Associated Press (AP).

Mr Hicks himself wrote in his memoir that he indeed trained in an Afghanistan camp that was allegedly maintained by al Qaeda but insisted that the whole experience was not intended for terror capabilities, the news agency said.

It appears now that the DPP is an agreement with Mr Hicks as it admitted in a statement that
"this Office was not in a position to ... satisfy the court that the admissions should be relied upon and decided that these proceedings should not continue."

The DPP admitted too that "the defendants served evidential material not previously available to the CDPP and AFP."

New South Wales state Supreme Court Justice Peter Garling accepted the submission and order the federal government to compensate Mr Hicks for all the trouble, which mostly would cover his legal cost in defending his right to sell his memoir.

The development also effectively removes all hindrances for the commercial availability of his book, which was released last year and earned some $10,000.

Mr Hicks will now be allowed to access the fund, which the NSW court had frozen last year, according to BBC.

In a statement, Mr Hicks said that what happened "has cleared my name."

"I hope that now the Australian government acknowledges that Guantanamo Bay and everything connected with it is illegal," he added.