Army Sgt. Bowe Bergdahl is awaiting sentencing after pleading guilty to charges of desertion and misbehavior before the enemy. (Oct. 23, 2017)

When sentencing hearings for Army Sgt. Bowe Bergdahl resume Wednesday at Fort Bragg in North Carolina, the judge face the increasingly difficult task of not only establishing what is true and fair in a complicated case but of doing so amid the most powerful political crosswinds possible. President Donald Trump may have held back last week from calling Mr. Bergdahl a despicable traitor or miming the action of executing him by firing squad, as he repeatedly did during last year's campaign, but he still left no doubt that he, the commander in chief of the U.S. armed forces, maintains that sentiment.

And he's not the only one who is calling for severe punishment for Mr. Bergdahl, who pleaded guilty to desertion and endangering American troops when he walked off an Afghanistan military base in 2009 and could now face life in prison, on top of the five years he spent enduring torture as a prisoner of the Taliban. Since his return from captivity in 2014 in a prisoner swap engineered by President Barack Obama's administration, Republicans in Congress have been calling for him to be jailed as a traitor. Sen. John McCain, the leading voice on military affairs in Congress, at one point threatened to hold hearings if Mr. Bergdahl wasn't punished — a clear case of political meddling into military justice.

Bowe Bergdahl's mother, Jani Bergdahl, with Bob Bergdahl and President Obama, speaks at the White House on May 31.
Bowe Bergdahl's mother, Jani Bergdahl, with Bob Bergdahl and President Obama, speaks at the White House on May 31. (Mandel Ngan / AFP/ Getty Images)

The interference cuts both ways, of course. President Barack Obama's very public embrace of Mr. Bergdahl's parents at the White House and then-National Security Adviser Susan Rice's assertion that he served with "honor and distinction" politicized this case from the start. We believed then and still do that the Obama administration made the right decision to exchange prisoners for Mr. Bergdahl's return. We do not outsource the punishment of possible deserters to the enemy, and we do not leave our own behind.

Those speaking the loudest publicly about Sgt. Bowe Bergdahl's desertion case have overlooked the consequences that his actions had on the unit he abandoned.

Still, it's entirely understandable that members of his unit and the military more generally are resentful of all the United States did to secure the return of a soldier who wandered off base in what he says was a misguided effort to hike to another facility to complain about leaders at his post. He got lost and was captured by the Taliban, and the military engaged in extensive efforts to find and rescue him. Whether any Americans were wounded specifically because of the rescue efforts is hotly debated within and outside of the military, and the judge in this case, Col. Jeffrey A. Nance, is due to hear evidence on that question. (The issue is not whether anyone was wounded — some American troops sustained severe, life altering injuries in the aftermath of his desertion. It's whether those injuries would not have taken place absent Mr. Bergdahl's action.)

There are mitigating factors at work as well. Mr. Bergdahl had previously left Coast Guard training because of psychological issues that should have prevented him from joining the Army in the first place. He was allowed in on a waiver at a time when the Army was desperate for more troops. The investigation into his desertion suggested delusions and poor decision-making, not treason. He endured severe torture during his captivity, but the Army concluded that he gave away no secrets and made repeated escape attempts despite the harsh treatment he received when caught. And, finally, he pleaded guilty to both counts he faced, including a rarely used charge related to his alleged endangerment of the troops sent to rescue him. He did so without any kind of plea deal with prosecutors and with the knowledge that it exposes him to the possibility of a sentence of life in prison. If this mess started with his failure of responsibility, it is ending now with an exercise of it.

Army Sgt. Bowe Bergdahl made a last-minute argument Tuesday that President Trump has reaffirmed his criticism of the soldier — preventing him from receiving a fair sentence on charges he endangered comrades in Afghanistan.

Colonel Nance is now faced with a motion to stop the sentencing based on President Trump's recent answer to a question about the case. Mr. Trump declined to say what he thinks should happen but added "people have heard my comments in the past." Colonel Nance has previously maintained that he would be able to handle the case objectively despite the political pressure, and we rather doubt that what was, by Trump standards, a cautiously veiled remark will change that. The Army has an interest in maintaining discipline and ensuring that other soldiers recognize the consequences of desertion. But it also needs to send a message that its discipline will be based on established rules and precedents, not political influence. An objective view of all facets of the case could support punishment for Mr. Bergdahl's actions, but only politics could explain a sentence of life in prison.

Become a subscriber today to support editorial writing like this. Start getting full access to our signature journalism for just 99 cents for the first four weeks.