GUANTANAMO BAY, Cuba, March 31 -- The plea deal that allows Australian David M. Hicks to leave the detention facility here with a nine-month sentence was negotiated between defense attorneys and the convening authority for military commissions without the knowledge of prosecutors, lawyers from both sides said.

The deal shows that the politically appointed authority has the power to personally decide the fate of America's most notorious terrorism suspects.

Marine Maj. Michael "Dan" Mori, representing Hicks, took his plea negotiations to Susan J. Crawford, the top military commission official, rather than dealing with prosecutors who were seeking a lengthy penalty, according to both sides in the case. In what became a highly politicized situation involving the Australian government, Crawford allowed Hicks a short sentence in exchange for a year-long gag order, a guarantee that he will not allege illegal treatment at the hands of his U.S. captors, and a waiver of any right to appeal or sue.

Though Australian officials have said they were not directly involved in plea negotiations, Mori declined to answer questions about what, if any, influence they had. Australian Prime Minister John Howard, up for reelection this year, has been under public pressure to bring Hicks home. He turned to Vice President Cheney to implore that the case be resolved. Crawford was the Defense Department's inspector general from 1989 to 1991, when Cheney was defense secretary.

"What an amazing coincidence that, with an election in Australia by the end of the year, he gets nine months and he is gagged for 12 months from talking about it," said Australian lawyer Lex Lasry, who was in Cuba to monitor the case over the past week.

Australia's foreign minister, Alexander Downer, told reporters in Australia on Friday night that there were initial plea discussions about Hicks's case two years ago and that the negotiations picked up speed recently. But, he said, "these are not decisions of the Australian government."

As the deal developed in recent weeks, Air Force Col. Morris Davis, the lead prosecutor for military commissions, and his team on the Hicks case were not in the loop. Davis said he learned about the plea agreement Monday morning when the plea papers were presented to him, and he said the prosecution team was unaware that discussions had been taking place.

"We got it before lunchtime, before the first session," Davis said at a news conference Friday night. In an interview later, he said the approved sentence of nine months shocked him. "I wasn't considering anything that didn't have two digits," he said, referring to a sentence of at least 10 years.

Army Maj. Beth Kubala, a spokeswoman for the Pentagon's Office of Military Commissions, said Crawford has the authority to approve plea deals and can use her discretion.

"Like it or not, the detainees at Guantanamo are from different countries, and that sometimes is a factor," Kubala said.

Davis said he could have chosen not to sign the papers but it would have been just a symbolic move. He said that he hopes the case does not set a precedent but that it is possible that other plea deals could come in the 75 or so other detainee cases his office is considering for trial.

Marine Lt. Col. Kevin Chenail, who prosecuted the case with Navy Lt. Brian Weinthal, said he was pleased with the outcome of the case because the jury panel agreed to the maximum punishment available to them under the deal -- seven years -- with very little evidence before them. Crawford's deal overrides that term, reducing it to nine months. Chenail said he thought he could have gotten a sentence of decades. Prosecutors had prepared for as many as 30 witnesses at trial and wanted to press forward with a case that Chenail called "extremely important."

"Sometimes you get too close to a case, but I thought he was one of the most dangerous people out there because he was a Westerner who bought into al-Qaeda," Chenail said of Hicks. "He's the kind of person who could use that to his advantage to infiltrate and earn people's trust."

Mori scored a major victory with the deal and said he's not sure Hicks has fully grasped it yet.

"I don't think David will be able to show any real emotion until he gets off the plane in Australia," Mori said. "David has some certainty now."

The plea agreement also set up what turned out to be irrelevant theatrics in the courtroom on Monday afternoon, when Hicks's two civilian attorneys challenged military commission rules and the presiding officer, Col. Ralph H. Kohlmann, removed them from the case. They each dramatically stormed out of the courtroom, leaving Hicks to give what appeared to be scripted answers about "losing" his attorneys and wanting fairness. Joshua Dratel, one of Hicks's attorneys who left, had signed the plea agreement and its specific parameters earlier in the day.

Mori said Kohlmann did not know that the plea agreement had been struck until after the first session on Monday, but Hicks did, as did the defense attorneys and prosecutors. Kohlmann, after being presented with the documents later in the day, called a surprise session Monday night to announce the guilty plea.