Bradley Manning, the soldier accused of instigating the largest leak of state secrets in US history, consciously selected the information he passed to WikiLeaks to ensure that it would be of no harm to the US and would not aid any foreign enemy, his lawyer argued on Tuesday.

David Coombs, Manning's civilian lawyer, revealed at a hearing at Fort Meade military base in Maryland what is likely to be a central pillar of the defence case at the soldier's court martial. A full trial is scheduled to start on 6 March.

Coombs said that the defence would be calling as a witness Adrian Lamo, the hacker who alerted military authorities to Manning's WikiLeaks activities, to give evidence about the web chat he had with Manning shortly before the soldier's arrest in Iraq in March 2010. The content of the web chat, Coombs suggested, would be used by the defence to show that Manning selected information to leak that "could not be used to harm the US or advantage any foreign nation".

The issue of Manning's motive in allegedly leaking hundreds of thousands of US diplomatic cables and war logs from Afghanistan and Iraq to WikiLeaks goes to the heart of the case against the soldier, Coombs argued. The most serious charge against him, "aiding the enemy", that carries a maximum sentence – in this case of life in military custody with no chance of parole – rests on the US government proving that Manning knew, or reasonably should have known, that the leak would be exploited by anti-US forces.

The prosecution has previously stated its case that by placing confidential documents on the internet, Manning in effect handed the intelligence to al-Qaida as the information was then freely available to anyone with a computer.

But Coombs insisted that the content of the Lamo web chats, backed up by evidence of other unnamed witnesses who would be called at trial, would show that Manning had no "evil intent" to help the enemy. Quite the contrary: he actively selected the material he passed on for its harmless impact on the US. He also believed that "information that is out in public can't do any harm", and thus having it "out there" would negate any of its potential for damaging national interests, Coombs said.

The disclosure of such an important line of defence – that goes to the core of Manning's thinking as he embarked on the massive WikiLeaks trove of state secrets – came amid legal argument relating to a prosecution motion relating to the issue of motivation. The military prosecutors are seeking to preclude any discussion of Manning's motives from the trial itself, arguing that they are irrelevant to determining whether or not he committed the offences for which he is charged.

The prosecution lawyer, Captain Angel Overgaard, told the court that in the US government's opinion, Manning's motives for leaking had no bearing on his state of mind or intentions when he carried out the acts and thus was irrelevant to the determining of the facts of the case at trial. "If somebody stole a loaf of bread to feed her family, she still stole the loaf, even though her motives were good," Overgaard said.

The presiding judge, Colonel Denise Lind, who will hear the trial without a jury at the request of the defence, quizzed the prosecution over aspects of its motion. Lind put herself into the character of Manning, and wondered whether the intensity of his motive could have blotted out his awareness of the consequences of his actions: "I'm thinking so much about what I want to do with this information that the enemy never crossed my mind," Lind speculated.

The hearing will continue with a prosecution motion to preclude any discussion at trial of the over-classification of state information. Part of Manning's motivation, the defence has argued, was that he believed the US government to be overbearingly secretive, but again the prosecutors contend that is irrelevant to the question of his guilt or innocence.