Army Sgt. Bowe Bergdahl’s request to have desertion and misbehavior charges against him dismissed are understandable, says a military lawyer, but unlikely to succeed.

On Monday, before a military judge at Fort Bragg, lawyers for Bergdahl -- who walked off his post in Afghanistan in 2009 and is accused of endangering the lives of soldiers who searched for him – pushed for the charges to be dismissed because of statements Donald Trump made during his presidential campaign condemning Bergdahl and saying he should be severely punished.

They argue that because of now-President Trump’s prior comments, their client cannot get a fair trial.

The judge, Army Col. Jeffery Nance, didn't immediately rule on the defense request, but called the footage of Trump condemning Bergdahl "disturbing material." A written decision was expected later.

“The defense counsel validly could make that argument” about Trump tainting the possibility of due process, military law expert Greg Rinckey told Fox News. “But I believe a judge won’t find [Trump’s actions] are unlawful command influence. If Trump makes comments now, it clearly would be.”

Unlawful command influence refers to a commander saying or doing something that would taint as guilty a military defendant who is facing an accusation.

“If a commander strips rank before a court martial, or restricts a soldier from the barracks, or has everyone give him the silent treatment, that’s unlawful command influence,” Rinckey said.

Bergdahl is scheduled for trial in April and could face a life sentence if convicted of misbehavior before the enemy.

Defense attorneys argue that Trump violated Bergdahl’s due process rights by repeatedly calling him a “traitor” and making other harsh statements about the soldier. The defense motion, filed shortly after Trump was sworn in as president, cites more than 40 instances of Trump’s criticism at public appearances and media interviews through August 2016.

Defense attorneys argue that potential jurors may feel obligated to agree with their new leader and would have a hard time ignoring the criticism.

Prosecutors contend that any reasonable observer would understand that Trump’s comments amounted to campaign rhetoric and should not be taken literally.

They argue that Trump’s use of the term “traitor” was not meant in the legal sense, but in a conversational way.

Bergdahl, who is from Idaho, has said he walked off his post to cause alarm and draw attention to what he saw as problems with his unit.

The Army’s investigating officer has testified that Bergdahl did not mean to desert and did not intend to join the Taliban. The officer said that to have Bergdahl serve time in prison would be “inappropriate,” according to the New York Times.

Rinckey said that while the judge is not likely to dismiss the charges, Bergdahl’s contention that a jury cannot avoid knowing about and being influenced by Trump’s condemnation may result in some time – perhaps days, or a month, for instance – deducted off his sentence if he is convicted.

Another expert, Eric Carpenter, a former Army lawyer who teaches law at Florida International University, said to the Associated Press, however, that potential military jurors could be influenced by Trump's comments even if he made them before becoming president.

"The prosecution is in a tough spot. These statements are really indefensible, and they have the job of defending them," he said. "No one in the administration has disavowed those comments, so the comments still have life."

The sergeant was held captive by the Taliban and its allies for five years. The Obama administration’s decision in May 2014 to exchange Bergdahl for five Taliban prisoners prompted some Republicans to accuse Obama of jeopardizing the nation’s safety.

The Associated Press contributed to this report.