A military panel at Guantanamo Bay, Cuba, recommended 23 years in detention Friday for two Malaysian men in connection with deadly 2002 bombings in Bali, a spokesperson for the military commission said.

However, under a previously secret provision of the plea agreement disclosed after the panel’s recommendation Friday, and a separate sentence reduction Friday by the presiding judge, both men may face a far shorter sentence: about five years.

Mohammed Farik Bin Amin and Mohammed Nazir Bin Lep already have spent about 17 years awaiting trial at Guantanamo.

The winding down of the case against them marks comparatively rare convictions in the two decades of proceedings by the U.S. military commission at Guantanamo.

The extremist group Jemaah Islamiyah killed 202 Indonesians, foreign tourists and others in two nearly simultaneous bombings at nightspots on the resort island of Bali in October 2002.

The two defendants denied any role or advance knowledge of the attacks but under the plea bargains admitted they had over the years conspired with the network of militants responsible. The sentence recommendation still requires approval by the senior military authority over Guantanamo.

The two are among a total of 780 detainees brought to military detention at Guantanamo under the George W. Bush administration’s “war on terror” following the Sept. 11, 2001, attacks on the U.S. There have been only a handful of convictions over the years — eight, according to one advocacy group, Reprieve.

Defendants in some of the biggest attacks, including 9/11, remain in pretrial hearings. Prosecutors are seeking negotiated agreements to close that case and some others.

Overall, the prosecutions at Guantanamo have been plagued by logistical difficulties, frequent turnover of judges and others, and legal questions surrounding the torture of detainees during CIA custody in the first years of their detention.

The military’s head of defense for the Guantanamo prosecutions on Friday blamed the Bush administration’s early handling of the detainees — which included holding at secret “black sites” and torture in CIA custody — for the more than 20-year delay in the trial.

The slow pace “was extremely distressing and frustrated the desire of everyone for accountability and justice,” Brig. Gen. Jackie Thompson said in a statement.

Thirty detainees remain at Guantanamo. Sixteen of them have been cleared and are eligible for transfer if a stable country agrees to take them.

“The time for repatriating or transferring the cleared men is now,” Thompson said. He said the same for three others held at Guantanamo but never charged.

As part of their plea bargains, the two Malaysian men have agreed to provide testimony against a third Guantanamo detainee, an Indonesian man known as Hambali, in the Bali bombings.

Under military court rules, Bin Amin and Bin Lep normally would receive no credit for the roughly two decades they have already spent in detention. The pretrial agreement disclosed Friday would spare them from serving the much longer recommended sentence on top of their years awaiting trial, the defense lawyers for the two men said.

Relatives of some of those killed in the Bali bombings testified Wednesday in a hearing in advance of sentencing, with the two accused in the courtroom and listening attentively.

A panel of five military officers delivered the recommendation after listening to the sentencing testimony.

The U.S. and Malaysia may agree to transferring the two to their home country, said Brian Bouffard, the attorney for Bin Lep.