Friday wrapped up the ninth day of testimony in the hearing on the pretrial confinement conditions of the soldier accused of leaking hundreds of thousands of classified documents to the anti-secrecy group WikiLeaks, with lawyers expected to present closing arguments next Wednesday.

Army Pfc. Bradley Manning, 24, is charged with 22 offenses ranging from improper use of a computer to aiding the enemy.

Col. Denise Lind, the military judge handling the case, is not expected to rule in the case until early February. If she rules in Manning’s favor, she could dismiss charges or give him credit at sentencing for time served in pre-trial confinement at the Marine Corps brig in Quantico.

Manning’s moment on the witness stand at Fort Meade came last week. He testified that for much of his time at Quantico he was kept in a 6-by-8-foot cell, 23 hours a day, and allowed 20 minutes a day of recreation time — restrictions that were imposed because Manning was considered either a suicide risk or on prevention-of-injury status. He acknowledged that he had contemplated suicide not long after his arrest in May 2010.

Manning, who is considered a celebrity in certain circles where he is seen as a whistleblower, at one point described fashioning a noose during his initial detention in Kuwait. He also donned the “suicide smock” that he wore when he was stripped of his clothing at the brig.

Despite the noose and Manning’s testimony that he had considered suicide, he said that he never really intended to kill himself.

This week, it was the prosecution’s turn. Most prosecution witnesses testified that holding Manning in what amounted to solitary confinement was justified because of the seriousness of the charges he faced and his prior history of anxiety, depression and “suicidal gestures.”

Chief Warrant Officer 4 James Averhart, a former commander of the brig, testified for more than eight hours Thursday about decisions concerning Manning’s confinement. The testimony offered some surreal moments, such as when Averhart tried to explain his definition of when detainees no longer presented a suicide risk.

Military regulations state that if there is no longer a risk of suicide, the detainee “shall be returned to appropriate quarters.” Defense attorney David E. Coombs asked why Manning was not removed from restrictive custody after brig psychiatrists judged him to be stable. Averhart replied that he did not move Manning into the general prison population because “shall does not mean immediately or right now.”

Averhart, who said the decision on whether to change Manning’s status was his alone, said he kept the soldier on suicide watch because of his history of anxiety and depression as well as what he believed to be Manning’s uncommunicative nature.

The former brig commander insisted that his 22 years of correctional experience gave him the ability to judge whether Manning was at risk of harming himself. “All I wanted to ensure was that this young man did not hurt himself,” he said.

Another government witness, Master Sgt. Craig Blenis, Manning’s primary counselor at the brig, testified that Manning’s history of depression and the fact that he is gay led to the decision to maintain the restrictions.

An e-mail Blenis wrote to Averhart was read into the record concerning a birthday package for Manning that was never delivered. Blenis wrote, “The package is being rejected and returned to sender due to the manner in which it was received and also because there was no prior request or knowledge of the package . . . and because we felt like being” obnoxious.

The hearing drew a large media presence for Manning’s testimony, his first public appearance, but the regular attendees are the Associated Press, a handful of bloggers and WikiLeaks supporters. Although media are not allowed to live tweet the hearing, follow these people on Twitter for updates during the court breaks: @ddishneau @carwinb, @kgosztola, @onearmedmaninc, @nathanLfuller, @WikileaksTruck