Legal experts say Army Sgt. Bowe Bergdahl's brutal captivity by Taliban allies carried significant weight in a judge's decision to spare him prison time for leaving his post in Afghanistan.

Criticism by President Donald Trump also appeared to push the judge toward leniency.

Army Col. Jeffery Nance didn't explain how he formulated his sentence that also included a dishonorable discharge. But the judge had to consider complex arguments for and against leniency.

Prosecutors unsuccessfully fought for a prison sentence. They cited soldiers who were injured when they searched for Bergdahl. But the defense argued that Bergdahl had suffered enough. He spent five years as a captive of the Taliban and also suffered from mental illnesses.

Former Army lawyer Eric Carpenter says an unusual amount of factors were in Bergdahl's favor.