U.S. Army Pfc. Bradley Manning is escorted out of a courthouse at Fort Meade in Maryland, July 18, 2013

As the court-martial winds down for the U.S. soldier accused of the largest leak of classified information in the nation's history, military prosecutors will try to portray him as arrogant and reckless, while the defense will seek to show he was well-meaning but naÃ¯ve.

Private First Class Bradley Manning, 25, faces 21 counts of leaking more than 700,000 documents related to the wars in Iraq and Afghanistan to the WikiLeaks anti-secrecy website. The most serious charge, aiding the enemy, carries a life sentence.

The case has pitted civil liberties groups who seek increased transparency into the actions of the U.S. military and security apparatus, against the government, which has argued that the low-level intelligence analyst, who was stationed in Baghdad at the time, endangered lives.

Army Colonel Denise Lind, who is presiding over the trial, last week rejected a request by the defense to throw out the aiding-the-enemy charge, saying that Manning's military training made it clear to him that any information released on the Internet could get into the hands of enemy agents.

"He was knowingly providing intelligence to the enemy," Lind said.

The case, which saw WikiLeaks publish classified files, combat videos and diplomatic cables, serves as a test of the limits of secrecy in the Internet age.

But it has recently been overshadowed to some degree by the case of fugitive U.S. spy agency contractor Edward Snowden, who revealed to Britain's Guardian newspaper early last month the details of alleged secret U.S. surveillance programs tracking Americans' telephone and Internet use.

The WikiLeaks website has become controversial both for its publishing of secret data and for its founder, Julian Assange, who has been sheltering in the Ecuadorean Embassy in London for more than a year to avoid extradition to Sweden for alleged sex crimes.

Manning was arrested in May 2010 while serving in Iraq.

In February, he pleaded guilty to lesser charges, including misusing classified information, such as military databases in Iraq and Afghanistan and files pertaining to Guantanamo Bay detainees.

Manning chose to be tried by a military judge, rather than have a panel of military jurors hear his case.

The defense attempted to portray Manning as well-intentioned but young and naive, while the prosecution maintained that he was a trained intelligence analyst who knew what the fallout of such a major leak would be.

In February, Manning read from a prepared 35-page statement in an attempt to explain why he released classified information to WikiLeaks.

"I believe that if the general public ... had access to the information ... this could spark a domestic debate as to the role of the military and foreign policy in general," Manning said.