A military judge sentenced Bergdahl on Friday to a reduction in rank to private (the lowest level), forfeiture of $1,000 a month for 10 months and a dishonorable discharge.
After all that testimony, Bergdahl and his attorneys were visibly nervous when they entered the courtroom to hear the sentence Friday morning. One of the attorneys had her hand on his back.
Army Col. Jeffery Nance came in immediately and read the sentence. Upon hearing the decision, Bergdahl's attorneys cried. Bergdahl's defense recommended only a dishonorable discharge.
"He relives that torture he experienced for five years," Cpt. Nina Banks, one of Bergdahl’s defense attorneys, said at the courthouse on Fort Bragg in Fayetteville, North Carolina, during closing arguments. "He will forever carry those scars with him."
But the prosecution focused on the men who searched for Bergdahl after his disappearance, risking injury and death.
Since both sides recommended the dishonorable discharge, Nance asked Bergdahl on Thursday, "Do you consent to a dishonorable discharge if it will preclude you from going to confinement?" Bergdahl replied, "Yes, sir."
"People died looking for him," Lobban said. "People were maimed and injured for life looking for him. And he gets to go home with all of his arms, all of his limbs and he gets to live his life while others can't live their lives."
One of the mitigating factors in his sentencing were disparaging comments by President Trump as a candidate and while in office. Nance ruled Monday that while Bergdahl can get a fair trial despite the remarks, he would consider them in his sentencing.
As a candidate, Trump denounced Bergdahl and the Obama administration's agreement to get him back from the Taliban. On Oct. 16, 2015, for example, Trump called him "a rotten traitor" and suggested he should be shot or dropped from an airplane.
"In the old days he'd get shot for treason," the president told a crowd of supporters. "If I win, I might just have him floating right in the middle of that place and drop him, boom. Let 'em have him. ... I mean, that's cheaper than a bullet."
More recently, Trump declined to comment on Bergdahl's case, telling reporters, "I think people have heard my comments in the past."
Even those comments were seen by Nance as "unlawful command influence," writing in his ruling, "The plain meaning of the president’s words to any reasonable hearer could be that in spite of knowing that he should not comment on the pending sentencing in this case, he wanted to make sure that everyone remembered what he really thinks should happen to the accused."
ABC News's Sarah Kolinovsky contributed to this report.