US Army Sergeant Bowe Bergdahl on Friday was spared prison time for endangering fellow troops when he deserted his post in Afghanistan in 2009, but a military judge ordered he should be dishonorably discharged from the service.
Bergdahl was brought home by President Barack Obama in 2014 in a controversial swap for five senior Taliban prisoners at Guantanamo Bay.
Dishonorable discharge is the most serious form of punitive discharge, reserved for "the highest of offenses which are often accompanied by a prison sentence in a military prison", according to Veterans Authority.
The judge had wide leeway because Bergdahl made no deal with prosecutors to limit his sentence.
Bowe Bergdahl had previously pleaded guilty to desertion and misbehavior before the enemy.
USA soldier Bowe Bergdahl has been spared jail for deserting his post in Afghanistan eight years ago, but his story isn't over just yet. Nance bought it and Bergdahl will simply face a dishonorable discharge, have his rank stripped and will pay $10,000.More news: Former Trinamool Congress leader Mukul Roy joins BJP and Modi fan club
His legal team in a statement obtained by CNN said Bergdahl has "looked forward to today for a long time" and expressed gratitude to all those involved in his release, including his parents and President Obama.
The case had been politically charged after Donald Trump called on Bergdahl a "no-good traitor who should have been executed" during his successful presidential campaign.
President Donald Trump condemned Nance's order in a Twitter post Friday afternoon.
Nance, acting on a defense motion, ruled that Trump's comments had not influenced him nor affected Bergdahl's chances of a fair sentence, but said he would consider them a mitigating factor. They cited soldiers who were injured when they searched for Bergdahl. He spent the next five years in captivity, where he's said he was kept in a small metal cage.
An email request for comment to Fidell wasn't immediately returned. "Sgt. Bergdahl paid a bitter price for the choices that he made".
The defense sought to counter that evidence with testimony about Bergdahl's suffering, his contributions to military intelligence and survival instruction and his mental health problems.