Soldier Bradley Manning betrayed his country by passing secret files to "information anarchists" at WikiLeaks and knew al-Qaeda would see the documents online, a prosecutor said in closing arguments.

As Manning's espionage court martial entered its final stage, the prosecution asked the judge to find him guilty of "aiding the enemy", dismissing the defence's portrait of the accused as a naive but well-intentioned truth-teller.

"He was not a troubled young soul, he was a determined soldier with the knowledge, ability and desire to harm the United States in its war effort," lead prosecutor Major Ashden Fein told the court.

"Your honour, he was not a whistle-blower, he was traitor."

As an intelligence analyst in Iraq, Manning pledged under oath to safeguard sensitive information held by the government, but he "abused and destroyed this ", Fein said.

In an online chat, Manning described the impact of his release of documents as a "beautiful and horrifying thing", the prosecutor added. "These are not the words of a humanist, but the words of an anarchist," he said.

He was not a troubled young soul, he was a determined soldier with the knowledge, ability and desire to harm the United States in its war effort

Lead prosecutor Major Ashden Fein

Manning, 25, has already admitted leaking hundreds of thousands of classified diplomatic cables and battlefield intelligence reports to WikiLeaks. But he has denied other charges, including the most serious count that he knowingly helped al-Qaeda, which carries a possible life sentence.

Displaying a photo of Manning smiling and looking "gleeful" - allegedly after he began releasing documents to WikiLeaks - Fein said evidence in the court martial showed Manning wanted to wreak havoc. "He was interested in making a name for himself," Fein said.

Working in military intelligence in Iraq, Manning was trained to know that "terrorists" used the internet to gather information for attacks against the US, he said. He was aware WikiLeaks had been identified in three military intelligence reports as a possible threat to national security.

The prosecution depicted Manning as an agent for WikiLeaks after having corresponded with founder Julian Assange and others in the organisation.

From November to December 2009, Manning was "searching for topics related to one mission - finding and disclosing what WikiLeaks wanted".

The defence was due to offer its closing argument yesterday.

Then the judge, Colonel Denise Lind, will deliver a verdict, possibly as soon as this weekend, three years after Manning was arrested in Iraq.