Sgt. Bowe Bergdahl, the soldier turned captive who pleaded guilty to desertion and misbehavior before the enemy, will not receive prison time.
Interested in Bowe Bergdahl?Add Bowe Bergdahl as an interest to stay up to date on the latest Bowe Bergdahl news, video, and analysis from ABC News.
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.
Bergdahl, 31, abandoned his Army post in Afghanistan in June 2009. He was captured by the Taliban and held for five years. The Obama administration secured his release in a prisoner exchange with the militant group in May 2014 -- a controversial decision that President Trump has long criticized.
"The decision on Sergeant Bergdahl is a complete and total disgrace to our Country and to our Military," Trump tweeted Friday, shortly after the news broke.
The prosecution in the case asked the judge to give Bergdahl 14 years of confinement, the term for prison used in military tribunals, building a case on the emotional stories of soldiers who were injured or killed in search missions for Bergdahl. For days, the prosecution called as witnesses some of the soldiers themselves and their family members and doctors.
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.
"[Bergdahl] described that choice as a huge mistake. But your honor, words have meaning," Maj. Justin C. Oshana, a prosecuting attorney, told Nance. "It wasn’t a mistake. It was a crime."
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."
The sentence provoked a strong response from some veterans, including Joe Lobban, who retired last year as an Army sergeant after years of deployments to Iraq and Afghanistan.
"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.