The military pretrial hearing for Pfc. Bradley Manning opened contentiously Friday, with his defense attorney arguing that the presiding officer lacked the impartiality to render fair judgment in a case growing out of the release of a trove of government secrets to WikiLeaks last year.

His attorney said Army Lt. Col. Paul Almanza, a reservist who also works for the Justice Department, could not be unbiased, citing that department’s ongoing investigation of WikiLeaks co-founder Julian Assange.

“That simple fact alone, without anything else, would cause a reasonable person to say, ‘I question your impartiality,’ ” the attorney, David E. Coombs, told Almanza, who works in the child exploitation unit of the Justice Department.

Almanza, formally known as the investigating officer in the hearing, rejected a request for recusal after considering it during a recess. He said his unit has no involvement in the case or in national security issues.

“I do not believe a reasonable person, knowing all the circumstances, would be led to the conclusion that my impartiality would be reasonably questioned,” he said. “I thus deny the defense request to recuse myself.”

Coombs then moved to file a writ with the Army Court of Criminal Appeals to stay the proceedings until a decision can be made on whether Almanza should continue to preside. The hearing can proceed while the appeals court weighs the request, military law experts said.

During the hearing, in a military courtroom at Fort Meade, Manning sat calmly at the defense table, watching his attorney intently and occasionally taking notes. Sporting close-cropped hair, Army fatigues and prison-issue, dark-rimmed glasses, he spoke only to answer brief questions regarding his rights and the charges.

It was the first public appearance for the 23-year-old, a former Army intelligence analyst in Baghdad, since he was detained in May 2010. The hearing will determine whether the case should proceed to a court-martial.

Prosecutors have charged Manning with aiding the enemy, which could carry a death penalty or life in prison, as well as violating the Espionage Act by causing government intelligence to be published on the Internet. Prosecutors have said they will not seek the death penalty, though it is ultimately up to a military commander known as a “convening authority” to decide whether to refer the case to court-martial and with what charges and penalties.

Coombs punctuated his arguments with gestures and occasionally turned to face the audience of about 45 people. At one point, Almanza chided him for playing to the gallery.

“Mr. Coombs,” he said, “who are you addressing?”

Coombs argued that Almanza has shown partiality by approving all 20 of the government’s requested witnesses while allowing only two of the defense’s 38 requested witnesses to appear. Some of those who were rejected would have been able to testify that the national security harm caused by the leaked documents would be minimal, Coombs said.

Meanwhile, he said, the government has been granted delays to determine whether the material leaked was properly classified and to assess the damage to national security and foreign relations.

“A year and a half later, this is what we are doing?” Coombs said. “Where’s the damage? Where’s the harm? That’s what the defense wanted to get at today in this hearing. Yet you again ruled today, ‘No, I’m not going to hear that.’ ”

Protesters gathered Friday morning outside the gates of Fort Meade to show support for Manning. Some attended the proceedings. As the hearing adjourned for the day, an antiwar veteran shouted, “Bradley Manning, you’re a hero!”

None of Manning’s family members were in the courtroom, though an aunt watched from a separate viewing area. The hearing is scheduled to resume Saturday.