A military judge ruled Wednesday that prosecutors will have to prove that Army Pfc. Bradley Manning knew he was providing information to the enemy when he disclosed hundreds of thousands of cables to WikiLeaks, the anti-secrecy group.

Army Col. Denise Lind, who is presiding over pretrial hearings at Fort Meade, Md., also said Manning’s defense team can present evidence that the former intelligence analyst selected documents to leak that would not harm national security.

Manning, 25, is scheduled to face a court-martial in June on charges of leaking sensitive government cables and other documents to WikiLeaks, which published them on its Web site and shared them with media outlets.

He could face life in prison if convicted of all 22 charges, including aiding the enemy. Lind did not identify the “enemy,” but previous testimony suggested it included Osama bin Laden, al-Qaeda and various affiliated groups.

Prosecutors have indicated that they intend to present evidence recovered from bin Laden’s compound that proves the terrorist leader asked for and received access to some of the WikiLeaks material Manning is alleged to have leaked.

Army Pfc. Bradley Manning is escorted out of a courthouse on June 25, 2012, in Fort Meade, Md., after a pretrial hearing. (Patrick Semansky/AP)

The damage assessments produced by intelligence agencies after WikiLeaks released the hundreds of thousands of documents will not be admitted into evidence by the prosecution or the defense after Lind’s ruling Wednesday. These assessments can be used at sentencing, but not in the findings part of the trial to prove or disprove harm caused by the documents’ release.

Manning was arrested in May 2010 in Iraq and eventually transferred to the military jail at Quantico. During his incarceration, he was kept in solitary confinement and denied clothing on occasion. Lind ruled this month that any sentence he receives should be reduced by 112 days because of the conditions of his confinement.

Manning’s lawyer, David E.Coombs, has also sought a dismissal of the case on the grounds that Manning has been denied a speedy trial. On Wednesday, he said witness testimony is likely to be less reliable given the time that has passed since the alleged offenses.

“It is just common sense to say, witnesses will say, ‘It has been several years, I don’t recall,’ ” Coombs argued.

Manning has been detained for 964 days.

Prosecutors argued that there has not been a break in the activity of the case and that any delays were in the interest of coordinating the many classification reviews for the material used in the charging documents. The military prosecutor, Maj. Ashden Fein, also pointed to the production of an unprecedented amount of data during the investigation.

A total of 30,000 pages of classified and unclassified motions have been produced in the case, none of which are available to the public because of the secrecy surrounding the proceedings. Eight terabytes of information have been processed in the case, an amount rivaling the printed volumes in the Library of Congress, Fein said.