Eighteen months after his arrest in Iraq for allegedly authoring the largest leak of state secrets in American history, Bradley Manning appeared in court and immediately started to turn the guns against his military accusers.

At the start of a preliminary hearing to establish whether the US soldier should be face a full court martial for allegedly passing more than 250,000 US embassy cables to WikiLeaks, his lawyer issued a dramatic challenge to the military presiding judge implying that the proceedings were biased and rigged.

David Coombs demanded that the judge, known as the investigating officer, Lt Colonel Paul Almanza, recuse himself from the case on the grounds that he works for the US department of justice, which is involved in the American criminal investigation into the founder of the whistleblowing WikiLeaks website, Julian Assange.

Coombs put it to the judge: "You have been at the department of justice since 2002; by your own admission you have prosecuted 20 cases. And the department has an ongoing investigation in this case."

He suggested that the department's intention was to force Manning into a plea bargain, so that he would give evidence against Assange. "If the department of justice got their way, they would get a plea in this case, and get my client to be named as one of the witnesses to go after Julian Assange and WikiLeaks."

Manning, aged 23, was appearing in public for the first time since 25 May 2010, when he was arrested at Forward Operating Base Hammer outside Baghdad. He was dressed in military fatigues, wore black-rimmed glasses and had closely cropped hair.

His only comments were to answer questions from the judge confirming that he was aware of the charges against him. The soldier faces a maximum sentence of life in military custody with no chance of parole - prosecutors have indicated they will not seek the death penalty, contrary to what was later suggested by Coombs to the hearing.

The full charge sheet was released for the first time: a total of 23 counts, the most serious of which is that Manning knowingly gave "intelligence to the enemy, though indirect means". The idea that WikiLeaks constitutes a conduit to an enemy of the US state will in itself be subject of much debate and legal argument.

A second charge accuses of Manning of causing information to be published "having knowledge that intelligence published on the internet is accessible to the enemy".

He is also charged with passing information from a secure database containing more than 250,000 records belonging to the US government – a reference to the US embassy cables published by WikiLeaks through an international group of newspapers including the Guardian in November 2010.

Another charge refers to the first act of publication by WikiLeaks in February 2010, a US embassy cable known as Reykjavik-13.

Coombs complained at the way his desired list of defence witnesses was whittled down by the judge. The prosecution, he said, had asked for 20 witnesses and was granted them all. By contrast, Coombs asked for 48 and had two approved. "Two out of 48!" he exclaimed. "In a case in which the government has charged [Manning] with aiding the enemy, which carries the maximum sentence right now of death!"

Manning's lawyer also protested that he was not allowed to call witnesses who would contest the true nature of the material leaked to WikiLeaks, and query the harm that it allegedly caused the US national interest. "Why are we here a year and a half later?" Coombs asked. "The government has asked for delay after delay after delay."

Aside from press and legal council, a few members of the public were allowed inside the courtroom on a first-come, first-served basis. Those who got in had queued at the military base since "predawn", an officer said. A vigil in support of Manning was held outside the main gates of Fort Meade, situated inthe state of Maryland.

The army has been criticised for taking so long to bring Manning to trial and faces further questions over how it is conducting the start of deliberations. The hearing is a preliminary stage, known as an Article 32, equivalent to a civilian pre-trial hearing, and is designed to assess whether the US soldier should be sent to a full court-martial.

Among the stranger aspects of the case is that it begins on a Friday and will run through the weekend. The military authorities have indicated that each day could extend late into the night.

Jeff Patterson, of the Bradley Manning support network, said: "To run the hearing through a weekend right before the Christmas vacation is clearly designed to minimise both media coverage and public protests."