A military judge won't throw out charges against Army Sgt. Bowe Bergdahl despite scathing comments that President Donald Trump made on the campaign trail.

Bergdahl's lawyers had argued that Trump's comments violated their client's due-process rights and that the judge should dismiss charges accusing him of endangering comrades by walking off his post in Afghanistan in 2009.

The Judge, Army Col. Jeffery Nance, wrote in his ruling Friday that he found Trump's comments disturbing but that they didn't constitute unlawful command influence.

He said that he would allow defense attorneys wide leeway to question potential jurors about Trump and that they could again ask for charges to be dropped after jury selection begins.

Bergdahl has been charged with desertion and misbehavior before the enemy and is scheduled for trial in April.