The military commissions system here may be taking on its most unlikely role, and one certain to cause consternation across the political spectrum: the least worst place for some defendants facing terrorism charges.

The plea agreement formalized this week between the government and Majid Khan, a former Baltimore resident who was accused of war crimes, is probably just the first in a series of deals in which detainees agree to testify against their erstwhile comrades in exchange for reduced sentences, according to military officials.

“This is his best shot at going home,” Lt. Col. Jon Jackson, Khan’s military defense counsel, said of the deal, which calls for the 32-year-old Pakistani to serve no more than 19 years if he fully cooperates with the government. Without a deal, Khan faced life in prison.

The debate over the appropriate forum for terrorism suspects is likely to sharpen with President Obama’s decision this week to issue a series of waivers that will make the transfer of any future captives to military custody a rare event. Republicans have blocked the Obama administration from transferring Guantanamo detainees to the United States for any reason, including prosecution.

But the justice system here is already scrambling any calculation that the military trials will produce long sentences, particularly when compared with the terms of incarceration handed down in federal courts.

“There’s a widespread perception that military commissions are tilted strongly against defendants, often based on the assumption that military officers will come down more harshly than federal judges. The record to date tells a very different story,” said Matthew Waxman, a professor at Columbia Law School and a former Pentagon official in the George W. Bush administration. “This plea deal will likely cause discomfort among both hard-line detention hawks and civilian libertarians. The former will see the sentence as too light, and the latter oppose the use of military courts.”

Before Khan’s, six military commissions had been completed over the past decade. Of those, five ended with relatively mild sentences. Two detainees have already gone home, and three more are scheduled to be repatriated in the next few years.

As part of his plea deal, Khan described meeting Khalid Sheik Mohammed, the self-proclaimed mastermind of the 9/11 attacks, several times on the streets of Karachi in 2002 and talking about various plots, including a possible suicide attempt against Pakistan’s then-president, Pervez Musharraf.

Later, in a hotel room in Peshawar, Mohammed told Khan that he wanted him to become a “new model” for sleeper agents in the United States. And for a defendant so closely associated with Mohammed, a 19-year sentence seems surprisingly short to some observers.

“It’s a better deal than you might have expected,” said Karen Greenberg, director for the Center on National Security at Fordham Law School. “The message here is that agreeing to co­operate is worth your while.”

She added, “Military commissions may favor defendants when it comes to a plea situation: Public pressure and Congress is less likely to second-guess plea deals made by the military.”

Federal courts have been comparatively harsh on terrorism suspects. Under Obama, only one detainee has been brought into the civilian court system from Guantanamo: Ahmed Ghailani, a defendant in the 1998 East Africa embassy bombings. Although he was convicted on only one count — conspiracy — in federal court in New York, he received a life sentence and was placed in the supermax prison in Colorado, the harshest facility in the U.S. penal system.

Human rights activists said the length of sentences has no bearing on their objections to military commissions. “It’s not about any individual case,” said Andrea Prasow, a counterterrorism specialist at Human Rights Watch who attended the Khan proceeding. “It’s about a principle: You can’t get a fair trial in a military commission.”

Some lawyers with clients at Guantanamo privately admit that they would be extremely reluctant to see them transferred to the United States for trial even if that was possible; better to hold out for repatriation or make a deal with the military.

J. Wells Dixon, Khan’s civilian counsel and a senior attorney at the Center for Constitutional Rights, which has been a fierce critic of military commissions, spoke of the potential dichotomy between opposing military commissions and representing an individual client here.

“The Center for Constitutional Rights has been very outspoken and unrelenting in its criticism of Guantanamo Bay. And that will continue,” said Dixon. “But we have a unique role. We represent individual clients. We represent Majid Khan, and we have a fundamental obligation to act in his best interest and to try and help him achieve the best outcome for him — regardless of how that might be viewed politically.”

Discussions already are underway about deals with other detainees, according to military officials. Such cooperation agree­ments would allow the government to build cases untainted by allegations of torture against its principal targets, such as the organizers of the Sept. 11, 2001, attacks and other high-value detainees. In some cases, where evidence is lacking or tarnished, cooperating witnesses could significantly buttress the government’s ability to secure convictions.

For detainees such as Khan, who was 23 when he was captured nine years ago and has a wife and child in Pakistan, a deal offers an end to the limbo of indefinite detention.

By turning a detainee into a public cooperator, the government also ruins his relations with his radical former “brothers,” reducing the risk of recidivism, officials argued.

There are now 171 detainees at Guantanamo. In 2009, the Obama administration concluded that 36 could be prosecuted. Plea agreements could increase that number, as some detainees may be willing to plead guilty to secure eventual release, even if the government did not intend to prosecute them because of evidentiary or other difficulties in going to trial.

Guantanamo’s chief military prosecutor, Brig. Gen. Mark Martins, has been intent on moving cases forward at a faster clip since he took over in October. He said Khan’s plea bargain is another step in the commissions’ maturation and legitimacy.

“Every system winds up having a major impact on those who plead guilty — in them wanting to get finality, wanting to get some kind of number that they can start working off and working toward,” he said. “We are looking for every avenue of lawfully obtained evidence, which does include seeking cooperation.”