SYDNEY -- The Australian government on Tuesday dropped its court battle to seize profits from a book written by a former Guantanamo Bay detainee, saying his guilty plea before a U.S. military commission could not be relied upon.

David Hicks, an ex-kangaroo skinner and Outback cowboy, said he felt vindicated by the decision. He was captured in Afghanistan in 2001 and spent more than five years at the U.S. prison camp in Cuba. A plea deal in 2007 allowed him to return to Australia to serve a nine-month prison sentence for providing material support to al-Qaida.

Last year, the government launched court action against Hicks, arguing that he should not be allowed to profit from his autobiography, "Guantanamo: My Journey," because he is a convicted criminal. Hicks is believed to have made around 10,000 Australian dollars ($10,300) from sales of the book.

On Tuesday, prosecutor Lionel Robberds told New South Wales state Supreme Court Justice Peter Garling that the government had decided to drop the case. In a statement, the prosecutor's office said there wasn't enough evidence to continue.

In Australia, criminals can be sued for money that a federal court determines is proceeds from their crimes, including indirect profits from book and movie deals. But it was unclear whether Australia's criminal profit law applied to Hicks because he pleaded guilty before a U.S. military commission – part of a justice system that has been widely criticized by lawyers and governments as unfair.

Hicks' lawyers had argued that their client could not be sued under Australia's criminal profit law because the conditions at Guantanamo amounted to duress. In a statement Tuesday, Hicks' legal team said the commonwealth decided to drop the case weeks after the lawyers provided evidence of the circumstances under which Hicks pleaded guilty, "including instances of severe beatings, sleep deprivation and other conditions of detention that contravene international human rights norms."

The Commonwealth Director of Public Prosecutions said in a statement that Hicks had provided "evidential material not previously available" to prosecutors after the initial legal challenge over his book profits was launched. The prosecutor's office did not explain what that evidence was, but said it subsequently decided that Hicks' admissions to the U.S. military commission could not be relied upon and opted to drop the case.

Justice Garling ordered the government to pay Hicks' court costs.

"In a way I feel that this has cleared my name," Hicks said after the hearing. "I hope that now the Australian government acknowledges that Guantanamo Bay and everything connected with it is illegal."

Hicks was captured in Afghanistan by the U.S.-backed Northern Alliance in late 2001. In his autobiography, he wrote that he had undergone military training in Afghanistan at a camp that former al-Qaida leader Osama bin Laden visited, but he denied that it was terrorist training.

He wrote that he admitted to a charge of providing material support to al-Qaida so he could escape Cuba. He said his only options were to plead guilty to a crime he did not commit or commit suicide.

Also on HuffPost: