Army Pfc. Bradley Manning is escorted into a courthouse in Fort Meade, Md., on May 21, 2013, before a pretrial military hearing. (Patrick Semansky/AP)

The judge in the court-martial of Pfc. Bradley Manning said Tuesday that she will close portions of the trial to the public to protect classified material, a ruling that is likely to frustrate civil liberties groups that have alleged the case is being shrouded in secrecy.

Prosecutors are expected to call 150 witnesses to testify against Manning, who is accused of leaking more than 700,000 government and military documents to the anti-secrecy group WikiLeaks. Although the material is widely available online, it remains classified.

Army Col. Denise Lind, the judge in the case, ruled that two dozen witnesses will be able to provide at least some of their testimony in closed session. She said the court had considered alternatives — including the use of code names — to keep the session open, but concluded that the public may be able to “connect the dots” and learn classified information.

The proceedings at Fort Meade marked the last pretrial hearing for Manning before the trial portion of his court-martial, which is scheduled to begin June 3 and last three to four months.

Civil liberties groups have argued that the court is restricting access to the case by withholding the judge’s motions, as well as transcripts of the proceedings and other material. Last year, the Center for Constitutional Rights filed a petition to order the court to grant the public and press wider access — a suit that an appeals court later tossed out.

Manning, a former intelligence analyst, pleaded guilty to several charges in February. He faces nearly two dozen counts in all, including aiding the enemy and violating the Espionage Act.

Prosecutors said Tuesday that they had agreed not to pursue a charge that Manning had violated the federal Computer Fraud and Abuse Act, reducing any prison sentence he faces by eight years if he is found guilty on other counts. Prosecutors did not provide a reason for their shift, and it was unclear why the charge was dropped.

Convictions on the more serious charges could carry a sentence of life in prison.

U.S. officials have said the leak exposed intelligence sources and embarrassed key officials of foreign governments.

Manning’s defense team had sought to block extensive testimony from witnesses concerning any damage caused by the release. Lind disagreed on Tuesday, ruling that prosecutors could call witnesses to provide context and evidence of the damage. She said, however, that she would limit that part of the trial so as not to have the case “devolve into many trials regarding international politics in many regions of the world.”

Among the witnesses expected to testify was a member of the team that raided Osama bin Laden’s compound in Pakistan in May 2011. Prosecutors had said the “DoD operator” — whom they did not identify — would testify that the terrorist leader had received access to some of the WikiLeaks material through an associate.

The witness may no longer be required to appear, however. On Tuesday, Manning accepted a “stipulation of fact” that he has accepted the existence of evidence showing that bin Laden had requested the material posted to WikiLeaks.