The military judge presiding over the trial, Col. Jeffery Nance, had wide leeway to impose anything from no sentence to life imprisonment. Though prosecutors had urged the judge to sentence Bergdahl to 14 years in jail, defense lawyers had argued for no prison time — just a dishonorable or bad-conduct discharge — because of the torture he suffered as a prisoner of war.
The 31-year-old from Hailey, Idaho, clenched his jaw and began to shake as the judge read the sentence, which included a demotion from sergeant to private and a forfeiture of pay of $1,000 a month for 10 months. Two defense attorneys on each side of him wrapped an arm around his back.
Less than an hour and a half after the sentencing, President Trump offered his thoughts on Twitter: "The decision on Sergeant Bergdahl is a complete and total disgrace to our Country and to our Military."
Outside the courthouse, Bergdahl's lead attorney, Eugene R. Fidell of Yale Law School, said Bergdahl was "still absorbing" the ruling, yet it was a "tremendous relief" to get no prison time.
Still, Fidell vowed he would appeal the ruling and continue to attempt to get the case dismissed on the basis of Trump's inflammatory comments about Bergdahl.
Last year, on the campaign trail, Trump called Bergdahl a "dirty rotten traitor" who deserved to be executed by firing squad or ejected from a plane without a parachute. A few weeks ago, Trump said he could not comment on the case, but then added: "I think people have heard my comments in the past."
"President Trump's unprincipled effort to stoke a lynch-mob atmosphere while seeking our nation's highest office has cast a dark cloud over the case," Fidell said. "Every American should be offended by his assault on the fair administration of justice and disdain for basic constitutional rights."
Bergdahl, who was captured in June 2009 within hours of walking off his remote post in eastern Afghanistan's Paktika province near the border with Pakistan, pleaded guilty last month to two charges: deserting his post in Afghanistan, which carries a punishment of up to five years, and "misbehavior before the enemy," a more serious charge that involves endangering the lives of fellow troops and carries a potential sentence of life imprisonment.
During his trial, prosecutors highlighted the hazards to which Bergdahl exposed his comrades who embarked on a massive search and rescue mission in the days and weeks after his disappearance. The judge heard emotional testimony from former Navy SEAL James Hatch, who was hit by enemy fire that shattered his right femur, and the wife of Master Sgt. Mark Allen, who was shot in the head, leaving him unable to speak or walk.
In turn, the defense team appealed for leniency, stressing the physical and emotional toll of five grueling years of captivity by the Taliban and its allies. In court, Bergdahl recounted how he was caged, tortured and beaten, and he apologized to those whose lives he endangered.
Jail time, the defense argued, threatened to exacerbate Bergdahl's already severe mental health problems. A forensic psychiatrist testified during the trial that Bergdahl suffered from post-traumatic stress disorder, as well as schizotypal personality disorder, which includes severe anxiety, unconventional behavior and grandiose thinking.
After the judge imposed his sentence, many within the military — including those who were wounded while attempting to rescue Bergdahl — expressed surprise and shock that Bergdahl would spend no time in jail.
Jonathan Morita, 33, of Valencia, Calif., a former Army corporal who testified for the prosecution about his injuries after a rocket-propelled grenade shattered his right hand during a search mission for Bergdahl, said in a telephone interview that he only "halfway" accepted the judge's decision.
Though Morita believed the judge was right to demote Bergdahl and hand down a dishonorable discharge, he said he had expected a sentence of at least 10 years in prison. As a result of Bergdahl's reckless decision to desert his post, Morita said, he could not bend his right thumb or index finger. His comrade, Sgt. Mark Allen, who was injured in the same mission, no longer can walk or speak.
"It's just unacceptable," he said. "I understand he was in captivity for five years. I get that he may have PTSD. … But he sat in the courtroom all this time, and he spoke in a clear, considered voice — just stone-cold. It didn't look like he's totally suffering. Now he's going to be free, while my sergeant, who ended up shot in the head, is never going to have a life again."
ThoughGen. Robert Abrams, the commanding general of Army Forces Command at Ft. Bragg who convened the court martial, could potentially reduce Bergdahl's punishment, he cannot increase it.
A dishonorable discharge, the most serious punitive discharge a judge can impose, strips a service member of all military and veteran healthcare and education benefits. Fidell said such a discharge carries a "lifetime stigma" that will deprive Bergdahl of substantial benefits.
"Beyond that, if you feel something fundamentally unfair has happened — and I am talking about President Trump here — that the judicial process has been distorted for improper, thoughtless reasons that are basically inimical to our way of life, rule of law in country, then you appeal," he added.
Bergdahl's fate has been the subject of fierce disagreement, in and outside the military, ever since he was brought home by President Obama in May 2014 in a widely criticized swap for five Taliban commanders held at a U.S. prison in Guantanamo Bay, Cuba.
While Obama celebrated his return, saying the U.S. does not ever leave its men and women in uniform behind, the U.S. House of Representatives swiftly passed a resolution condemning the Obama administration's failure to notify Congress before striking the deal and expressing national security concerns over the Taliban prisoners' release.
During the trial, Bergdahl's attorneys repeatedly argued that Trump's inflammatory comments constitute an "undue command influence" that has made a fair trial impossible. Yet on Monday, Nance ruled that although unlawful command influence is the "mortal enemy of military justice," Trump's comments would not prevent Bergdahl from receiving a fair trial because, as the sole sentencing authority, he was uninfluenced by the president's opinions and held "no fear of any repercussions from anyone" who did not agree with the sentence he imposed.
Rejecting a defense motion to dismiss the case, Nance said he would consider Trump's comments as mitigating evidence that could lessen punishment.
Although Nance's decision not to impose jail time was influenced by the fact that Bergdahl tried to redeem himself by trying to escape, Trump's comments more than likely compelled the judge to send a message to the government.
"Whatever likelihood that Nance was going to sentence Bergdahl to a couple of years evaporated a couple of days ago when Trump made that statement," said Geoffrey Corn, a retired lieutenant colonel who is professor at South Texas College of Law in Houston. "Trump's statements were inflammatory and they were stupid, and you know the military justice system is very, very vigilant about the effect of unlawful command influence impacting soldiers' ability to get a fair trial."
Jarvie is a Times special correspondent.
2:10 p.m.: This article was updated with reaction from Bowe Bergdahl's defense lawyer, witnesses and other details.
10:30 a.m.: This article was updated with a tweeted reaction to the judge's decision from President Trump.