Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

For those who scoff at the notion that President Donald Trump's words may have given Army Sgt. Bowe Bergdahl a solid chance at getting his desertion and misbehavior-before-the-enemy charges tossed, consider this: It wouldn't be the first time a pronouncement from the White House hobbled a military prosecution.

In 2013, a military trial judge in Hawaii ruled that two service members accused of sexual assault could not be given dishonorable discharges — even if they were convicted — because President Barack Obama had publicly declared that convicted rapists in the ranks should be "prosecuted, stripped of their positions, court martialed, fired, dishonorably discharged. Period.”

Lawyers for the accused argued successfully that Obama, who was just responding to a Pentagon report about the rising number of sexual assaults in the military, had exerted “unlawful command influence” as commander in chief by spelling out specific consequences for members of the military convicted of rape.

That judge did not conclude that Obama's statements resulted in actual unlawful command influence, just the appearance of UCI.

Related: Bowe Bergdahl Says Returning to U.S. Was as Tough as Captivity

And that can be enough; military courts long ago expanded the unlawful command influence doctrine to include “apparent” unlawful command influence. Apparent UCI is not so much about a fair trial; it’s about the belief in a fair trial.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Trump, by comparison, has not only called Bergdahl a “dirty rotten traitor” on the campaign trail, he suggested a specific punishment for the Idaho soldier — execution by firing squad or throwing him from a plane without a parachute.

And now Bergdahl's defense team is moving to dismiss the charges against him for apparent UCI committed by Trump after he was elected president — a Rose Garden appearance on Oct. 16 during which he at first said he couldn't talk about the case and then added: "But I think people have heard my comments in the past."

The defense’s initial argument was this: Candidate Trump made disparaging comments about the defendant while he was just a civilian. Once he took office, Trump ascended to what Bergdahl’s attorneys call the “pinnacle of an unbroken chain of command” over all the armed forces.

The president, they argued, has command influence over everyone in the Army, including every service member involved in Bergdahl’s case.

So any military judge hearing the case, any commander approving a plea agreement, and any judge on the Court of Criminal Appeals couldn’t help but be influenced by the president.

Related: Judge Agrees to Suppress Bergdahl's Statements Made in Captivity

After Trump’s inauguration, the defense moved to dismiss the case for apparent UCI, arguing that Trump’s prior statements as a civilian should be imputed to him as the president.

The court found Trump’s statements about Bergdahl disappointing and problematic, but they denied the motion. Still, they allowed the defense to revisit the issue in the future.

Some 10 months and one Rose Garden appearance later, Trump handed the defense another chance to argue UCI and to claim that Trump, by referring back to his pre-inauguration statements about Bergdahl, resurrected them as if he had fully re-stated them as president.

They contend that when Trump reconfirmed his position on Bergdahl as the president, he sent a not-so-subtle message to every officer in the chain of command with authority over Bergdahl’s case and sentencing.

So if Trump’s “comments in the past” are deemed to be the current policy of the Commander in Chief of the Armed Forces, does Bergdahl actually have a chance of winning this motion?

Actually, he does.

Danny Cevallos is a legal analyst for MSNBC.