FORT BRAGG, North Carolina (WTVD) -- Army Sgt. Bowe Bergdahl, who was held for five years by Taliban allies after walking off his post in Afghanistan, learned his punishment Friday after pleading guilty to endangering his comrades.
He will not get jail time. He has been stripped of his rank and will be dishonorably discharged. The judge also ordered he must forfeit pay equal to $1,000 per month for 10 months. The judge made no other comments.
President Trump reacted on Twitter almost immediately, calling the sentence a "total disgrace."
Bergdahl had faced up to life in prison for desertion and misbehavior before the enemy.
In closing arguments, defense attorneys argued that Bergdahl already had suffered enough confinement during five years of brutal captivity by Taliban allies. Their argument for leniency also cited harsh campaign-trail criticism by Donald Trump and Bergdahl's mental disorders.
After the sentencing, attorney Eugene R. Fidell said Bergdahl has lost a decade of his life and said the soldier is "deeply grateful to everyone who searched for him, especially those who were injured."
Fidell said Bergdahl will appeal the decision to give him a dishonorable discharge.
During his trial, Bergdahl himself testified that he was sorry for the wounds suffered by searchers. He also described brutal beatings by his captors, illness brought on by squalid conditions and maddening periods of isolation, most of it in a cramped cage.
A psychiatrist testified that Bergdahl's decision to leave his post was influenced by a schizophrenia-like condition called schizotypal personality disorder that made it hard to understand consequences of his actions, as well as post-traumatic stress disorder brought on partly by a difficult childhood.
Prosecutors asked for a sentence of 14 years in prison, citing serious wounds to service members who looked for Bergdahl.
"Sgt. Bergdahl does not have a monopoly on suffering as a result of his choices," said Maj. Justin Oshana, a prosecutor. Contrasting Bergdahl to the wounded searchers, he added, "The difference is, all the suffering stems from his choice."
Oshana also cited Bergdahl's own words to argue against the idea that his thinking was clouded. On a courtroom monitor he displayed quotes from an initial investigation after Bergdahl returned to the U.S. Bergdahl, who has said he walked off to draw attention to problems with his unit, described to an investigating officer how he envisioned the missing-soldier alert unfolding.
Bergdahl had said that the call goes "all the way up to Army command, it goes to Air Force, it goes to Marines. ... It goes to every high point and everybody finds out about it."
Bergdahl pleaded guilty Oct. 16. The judge has wide discretion on sentencing because he didn't strike a deal with prosecutors to limit his punishment. A bad conduct or dishonorable discharge would deprive Bergdahl of most or all his veterans' benefits.
The 31-year-old soldier from Hailey, Idaho, was brought home by President Barack Obama in 2014 in a swap for five Taliban prisoners at Guantanamo Bay. Obama said at the time that the U.S. does not leave its service members on the battlefield. Republicans roundly criticized Obama, and Trump went further while campaigning for president, repeatedly calling Bergdahl a traitor who deserved death.
The Associated Press contributed to this report