FORT MEADE, Md. — U.S. Army Pfc. Bradley Manning was a traitor with one mission as an intelligence analyst in Iraq: to find and reveal government secrets to a group of anarchists and bask in the glory as a whistleblower, a prosecutor said Thursday during closing arguments.

Maj. Ashden Fein said Manning betrayed his country's trust and spilled classified information to the anti-secrecy website WikiLeaks, knowing the material would be seen by al-Qaida. Even Osama bin Laden had some of the digital files at his compound when he was killed, the prosecutor said.

"WikiLeaks was merely the platform which Pfc. Manning used to ensure all the information was available for the world, including enemies of the United States," Fein said.

Manning is charged with 21 offenses, but the most serious is aiding the enemy, which carries a possible sentence of up to life in prison. Defense attorneys will present their closing arguments Friday.

Manning, 25, was not the troubled, naive soldier defense attorneys have made him out to be, Fein said. He displayed a smiling photo of Manning from 2010 when he was visiting relatives in Maryland on leave.

Fein said: "This is a gleeful, grinning Pfc. Manning" who sent battlefield reports to WikiLeaks, accompanied by the message: "Have a good day."

Manning, a native of Crescent, Okla., has acknowledged giving WikiLeaks hundreds of thousands of battlefield reports, diplomatic cables and videos in late 2009 and early 2010. But he says he didn't believe the information would harm troops in Afghanistan and Iraq or threaten national security.

Fein, the military's lead prosecutor, said Manning had a dog tag with "humanist" engraved on it, but "the only human Pfc. Manning ever cared about was himself."

"The flag meant nothing to him," Fein said in his nearly five-hour summation.

Prosecutors must prove Manning knew al-Qaida would see the material to get a conviction on the most serious charge of aiding the enemy. They presented evidence Manning knew "the enemy" in general used the Internet, and that leakers with evil intent might use WikiLeaks to spill secrets.

A military judge, not a jury, is hearing the case at Manning's request. Army Col. Denise Lind will deliberate after closing arguments. It's not clear when she will rule.

The verdict and any sentence will be reviewed, and could be reduced, by the commander of the Military District of Washington, currently Maj. Gen. Jeffery S. Buchanan.

Manning supporters showed up hours before court opened to protest outside the Army base. Inside the courtroom, about 35 spectators watched, many wearing T-shirts with the word "truth" printed on them.

Fein's cutting closing remarks, including calling Manning a traitor, struck a chord with supporters.

As court recessed for the day, a man said aloud, "You're a hero, Bradley, as far as I'm concerned." Several others murmured support for Manning in what became a loud buzz.

Lind, standing up to leave, angrily shouted, "Gallery, that's enough!" Then she walked out of the courtroom.

Outside, defense attorney David Coombs reassured Manning supporters.

"If it takes six, seven hours to go on a diatribe and try to piece together some convoluted story," he said, "if it takes you that long to get your point across, you know it isn't true."

Coombs said on Friday they would hear what truth sounds like

Manning sat quietly in his blue dress uniform and followed along as the prosecution showed slides, reading them off of monitor on the defense table.

Fein said Manning relied on WikiLeaks and its founder Julian Assange for guidance on what to leak, starting within two weeks of his arrival in Iraq in November 2009.

Referring to a "Most Wanted Leaks" list the organization published, Fein said WikiLeaks sought almost exclusively information about the U.S.

"What is obvious is that Pfc. Manning pulled as much information as possible to please Julian Assange in order to get that information released," Fein said. He later described the group as "a bunch of anti-government activists and anarchists."

Federal authorities also are looking into whether Assange can be prosecuted. He has been holed up in the Ecuadorean Embassy in London to avoid extradition to Sweden on sex-crimes allegations.

Also Thursday, the judge refused to dismiss theft charges against Manning after the defense said prosecutors hadn't proven the allegations.

A counterintelligence witness, in classified testimony, valued the Iraq and Afghanistan war logs at about $5.7 million, based on what foreign intelligence services had paid in the past for similar information, Fein said.

Manning pleaded guilty earlier this year to reduced versions of some charges. He faces up to 20 years in prison for those offenses, but prosecutors pressed ahead with the original charges.