A former Baltimore area resident held at Guantanamo Bay, Cuba, has reached a plea agreement with military prosecutors that calls for him to testify at the trials of other detainees in exchange for a much-reduced sentence and eventual freedom, according to officials familiar with the case.

The plea agreement with Majid Khan, 31, is the first with a high-value detainee who was previously held by the CIA at a secret prison overseas.

Khan’s plea agreement could mark the beginning of an effort to accelerate the number of military commission cases by the new chief military prosecutor, Brig. Gen. Mark Martins, who assumed his position in October.

“What we are beginning to see are the fruits of putting General Martins in as chief, and he is bringing rigor, professionalism and energy to” a system that was stalled, said Charles “Cully” D. Stimson, a former deputy assistant secretary of defense for detainee affairs in the George W. Bush administration and now a senior legal fellow at the Heritage Foundation. “You would expect cases to start flowing, and one part of that is pleas.”

There are 171 detainees being held at Guantanamo Bay, and an Obama administration task force recommended that 36 of them be prosecuted in federal court or military commissions.

Khan was charged this month with war crimes, including murder, attempted murder, spying and providing material support for terrorism. Unusually, the case was almost immediately referred to a commission, signaling that a deal was in the works. Such referrals typically take weeks or months.

Khan was captured in Pakistan in March 2003. He vanished into the CIA’s network of prisons until Bush announced in September 2006 that Khan and 13 other high-profile detainees, including Khalid Sheik Mohammed, the self-proclaimed mastermind of the Sept. 11, 2001, attacks, had been transferred to Guantanamo Bay.

Khan’s June 2008 detainee assessment at Guantanamo Bay found him to be a high risk to the United States and its allies, a low detention threat, and of “high intelligence value.”

In recent days, Khan, a Pakistani citizen who was a legal U.S. resident, was moved out of the top-security Camp 7, which houses the high-value detainees, in anticipation of an arraignment next week at which he will enter a guilty plea, said the officials, speaking on the condition of anonymity in advance of the hearing.

Khan has agreed, if requested, to testify at military commission trials in the next four years, and he would then be eligible to be transferred to Pakistan at some point after that, the officials said. Khan has a wife and daughter in Pakistan.

The officials would not specify the amount of time Khan would serve if he fulfilled his obligations under the agreement.

“There is an arraignment next week, and Mr. Khan has every right to enter any motion,” said Lt. Col. Todd Breasseale, a Pentagon spokesman.

Lt. Col. Jon Jackson, Khan’s military attorney, declined to comment. J. Wells Dixon, Khan’s civilian attorney at the Center for Constitutional Rights in New York, also declined to comment.

Since the military detention center opened in 2002, six commission cases have been completed, resulting in four plea bargains, a short sentence and a guilty verdict that led to a life sentence. Two of those six detainees have been released, and three more are scheduled to be sent home over the next few years as a result of the pleas.

Congress has blocked attempts by the Obama administration to hold trials in the federal courts in the United States. Only one Guantanamo detainee, Ahmed Ghailani, a Tanzanian, has been transferred to the federal system by the Obama administration, and he is serving a life sentence at the supermax facility in Florence, Colo.

Abd al-Rahim al-Nashiri, the alleged planner of the 2000 al-Qaeda attack on the USS Cole in Yemen, was arraigned on capital charges in a military commission in November. Military prosecutors also have sworn charges against Mohammed and four co-defendants, and an arraignment at Guantanamo Bay is expected this spring.

Both of those cases are expected to proceed to trial. And Khan could testify in the Sept. 11, 2001, case.

Mohammed allegedly chose Khan, a graduate of Owings Mills High School in suburban Baltimore, because he spoke like an American, a valuable attribute as they planned a series of follow-up operations after the Sept. 11 attacks, according to military documents assessing detainees at Guantanamo Bay. Those potential attacks included targeting underground gasoline storage tanks, according to the U.S. military.

The military alleged that Khan worked closely with Mohammed and performed at least two test operations to assess his commitment, including a “pseudo-suicide assassination attempt” against Pakistani President Pervez Musharraf.

Khan is also alleged to have delivered $50,000 to Jemaah Islamiah, a regional terrorist organization in Southeast Asia, to fund the bombing of the JW Marriott Hotel in Jakarta, Indonesia, in August 2003.

Khan first moved to the United States in 1996 with his parents, who ran a gas station where their son worked after graduating high school. According to the military, Khan traveled to Pakistan in January 2002 and returned to Baltimore a few months later to acquire a laptop for al-Qaeda and get information about the U.S. military. After he went back to Pakistan in August 2002, Khan worked directly for Mohammed, according to the military.

Since he arrived at Guantanamo, Khan has twice tried to kill himself by chewing through his own arteries, according to a transcript of a hearing released by the Pentagon in 2007.

Staff researcher Julie Tate contributed to this report.