Updated

An Australian detainee held for five years at Guantanamo Bay was found guilty Friday of supporting terrorism, the first conviction at a U.S. war-crimes trial since World War II.

David Hicks, a 31-year-old Muslim convert, faces a prison sentence of up to seven years under a plea agreement revealed Friday that also requires Hicks to drop any claims of mistreatment by the U.S. government since he was captured in Afghanistan and taken to Guantanamo Bay, said the judge, Marine Corps Col. Ralph Kohlmann.

If sentenced to seven years, the plea agreement calls for an unknown portion of that to be suspended.

Hicks had pleaded guilty to the charge Monday night but was not convicted until Kohlmann accepted his plea during Friday's session.

The agreement calls for Hicks to be returned to Australia within 60 days of his sentencing, which is expected within days. The U.S. government had previously agreed to let him serve any sentence in Australia.

Hicks, 31, was dressed for the hearing in a gray suit with a dark tie and with his hair newly cut short. The former outback cowboy and kangaroo skinner who aided Al Qaeda during the U.S.-led invasion of Afghanistan showed little emotion as he confirmed to the judge that he conducted surveillance on the former American Embassy in Kabul.

Hicks could have been sentenced to life in prison. He had been also charged with supporting terrorist acts but that count was dismissed as part of the agreement.

Hicks, who had complained of abuse in U.S. custody in Afghanistan and at Guantanamo, agrees as part of the deal that he has "never been illegally treated by a person or persons while in the custody of the U.S. government," Kohlmann said.

He will also be required to cooperate with U.S. and Australian authorities to share his knowledge of Al Qaeda and a militant Pakistani group, Lashkar-e-Tayyaba, which helped him travel to Afghanistan to attend terrorist training camps.

"Any failure to cooperate with U.S. or Australian law enforcement may delay your release from confinement," Kohlmann said.

Another condition calls for him to hand over to the Australian government any proceeds from selling the rights to his life story, depriving him of an opportunity to cash in on the sought-after details of his crimes and imprisonment. A gag order will prevent him from speaking with the media for a year from the sentencing date.

A panel of U.S. military officers responsible for approving Hicks' sentence were flying into Guantanamo from bases around the world and were expected to reach a decision within days. Two-thirds of the members will have to agree on the ruling.

In the days before his arraignment Monday, Hicks' lawyers said their client was severely depressed and eager to find a way to leave Guantanamo, where he lives by himself in a small, maximum-security cell. Observers including Hicks' father have suggested he pleaded guilty only to escape the isolated military prison.

On Friday, Hicks told the judge he pleaded guilty because he believed the government had enough evidence to convict him at trial.

Speaking in a deep voice, he said he reached that conclusion after seeing "notes by interrogators taken from me."

Hicks is the only detainee charged so far under a new military tribunal system. Prosecutors say they plan to charge as many as 80 of 385 Guantanamo men who have been held for years without trial on suspicion of links to Al Qaeda or the Taliban.

The Pentagon established the tribunals to try foreigners deemed "enemy combatants," claiming the authority to hold them indefinitely and try them outside of U.S. civilian courts or courts-martial because they represent a terror threat to the United States.

The U.S. Supreme Court, which struck down a previous tribunal system at Guantanamo as unconstitutional, is considering a challenge of the law passed last year to establish the revised tribunals. Some members of Congress have also vowed to repeal the law that eliminates detainees' access to U.S. courts.