Judge rules that Manning will not be allowed to present evidence about his motives for the leak – a key plank of his defence

Bradley Manning, the US soldier accused of being behind the largest leak of state secrets in America's history, has been denied the chance to make a whistleblower defence in his upcoming court martial in which he faces possible life in military custody with no chance of parole.

The judge presiding over Manning's prosecution by the US government for allegedly transmitting confidential material to WikiLeaks ruled in a pre-trial hearing that Manning will largely be barred from presenting evidence about his motives in leaking the documents and videos. In an earlier hearing, Manning's lead defence lawyer, David Coombs, had argued that his motive was key to proving that he had no intention to harm US interests or to pass information to the enemy.

The judge, Colonel Denise Lind, ruled that general issues of motive were not relevant to the trial stage of the court martial, and must be held back until Manning either entered a plea or was found guilty, at which point it could be used in mitigation to lessen the sentence. The ruling is a blow to the defence as it will make it harder for the soldier's legal team to argue he was acting as a whistleblower and not as someone who knowingly damaged US interests at a time of war.

"This is another effort to attack the whistleblower defence," said Nathan Fuller, a spokesman for the Bradley Manning support network, after the hearing.

The judge also blocked the defence from presenting evidence designed to show that WikiLeaks caused little or no damage to US national security. Coombs has devoted considerable time and energy trying to extract from US government agencies their official assessments of the impact of WikiLeaks around the world, only to find that he is now prevented from using any of the information he has obtained.

The 25-year-old intelligence analyst faces 22 charges relating to the leaking of hundreds of thousands of classified diplomatic cables, war logs from the Afghan and Iraq wars, and videos of US military actions. The most serious charge, "aiding the enemy", which carries the life sentence, accuses him of arranging for state secrets to be published via WikiLeaks on the internet knowing that al-Qaida would have access to it.

The US government is expected at trial to present evidence that allegedly shows that Osama bin Laden personally requested to see some of the WikiLeaks publications attributed to Manning and that documents were found on his computer following the US navy Seals raid that killed him.

In a limited victory for the defence, Coombs and the defence team will be allowed to talk about the soldier's motives on two narrow counts: where it can be used to show that he did not know that his leaks would be seen by al-Qaida; and as evidence that he consciously selected certain documents or types of documents in order to ensure they would not harm the US or benefit any foreign nation.

Lind's ruling means that some of the most impassioned statements by Manning about why he embarked on the massive transfer of information to WikiLeaks will now not be heard at trial. In the course of a now famous web chat he had with the hacker-turned-informer Adrian Lamo, Manning wrote : "information should be free / it belongs in the public domain / because another state would just take advantage of the information … try and get some edge / if its out in the open … it should be a public good."