The military judge in the court-martial of the US soldier accused of handing WikiLeaks the biggest trove of unauthorised state secrets in American history has put army prosecutors on notice that they must prove Bradley Manning knew he was helping the enemy or face the possibility that the most serious charge against him be dismissed.

Colonel Denise Lind refused to throw out the charge – "aiding the enemy" – as had been requested by Manning's defence lawyers. But she told the military prosecution that during the trial, now scheduled for the end of September, that they would have to prove that the intelligence analyst was fully aware that he was helping the enemy when he allegedly handed hundreds of thousands of secret US documents to WikiLeaks.

Aiding the enemy is the most serious in the list of 22 charges that have been brought against Manning. It carries a maximum penalty of life in prison.

The trial will start on 21 September and is expected to last three weeks. It is certain to be closely followed in America and around the world, both by those who see Manning as a traitor to his country and military superiors, and by those who believe he was a hero who is being punished for being a whistleblower.

In seeking dismissal of the most serious offense, defense attorney David Coombs had argued that the charge did not properly allege that Manning intended to help al-Qaida when he allegedly sent hundreds of thousands of classified Iraq and Afghanistan war reports and state department diplomatic cables to the anti-secrecy website WikiLeaks.

Manning stated in an online chat with a confidant-turned-informant that he leaked the information because "I want people to see the truth".

Prosecutors had argued that Manning knew the enemy would see the material when it appeared on WikiLeaks, regardless of his intentions.

Manning hasn't entered a plea to any of the charges. He also hasn't yet decided whether he will be tried by a judge or a jury.

Earlier Thursday, Lind rejected a motion to consolidate some charges that the defense said were duplicative. She said the defense could raise the motion again for sentencing purposes if Manning is convicted.

She denied another defense motion seeking to dismiss a count on the grounds that it was improperly charged. That count alleges that Manning wrongfully and wantonly caused intelligence to be published on the Internet, knowing it would be accessible to the enemy.

Lind also heard arguments on a government motion to bar any discussion at trial of whether the leaked material harmed US interests. Prosecutor major Ashden Fein said the government must prove only that Manning leaked the material knowing it could cause harm, regardless of whether it did.

The motion appeared to be aimed at blocking the defense's attempts to obtain classified reports compiled by the departments of defense, state and justice assessing the damage done by the WikiLeaks disclosures. Defense attorney David Coombs said the reports probably say the leaks did little or no damage; otherwise, he said, the prosecution would be eager to discuss them.

Fein said that since the government doesn't have to prove damage, any courtroom discussion of damage assessments would waste the court's time.

The 24-year-old Oklahoma native was ordered court-martialed after he was accused of downloading the war logs, cables and video clips and then sending them to WikiLeaks. He was working as an intelligence analyst in Baghdad when authorities say he copied classified material from government computers in late 2009 and early 2010.

The material WikiLeaks published included cockpit video of a 2007 US Apache helicopter attack that killed a number of civilians, including a Reuters news photographer and his driver. The US government says the civilian deaths were accidental.

Prosecutors acknowledged in court Wednesday that the helicopter video was not classified, although Manning allegedly got it from a military computer network reserved for classified material. He is charged with "having unauthorized possession" of the video clip.

Manning has been in pretrial confinement since he was charged in May 2010. He has been held since last April at Fort Leavenworth in Kansas.

His earlier treatment at a marine corps base caused support for him to swell. The Quantico, Virginia, brig commander kept Manning confined 23 hours a day in a single-bed cell, citing safety and security concerns. For several days in March 2011, he was forced to sleep naked, purportedly for injury prevention, before he was issued a suicide-prevention smock.

Manning's supporters have raised funds to place posters in the Washington metro subway system this week portraying him as a whistleblower, patriot and hero.