Slideshow ( 4 images )

FORT BRAGG, N.C. (Reuters) - U.S. 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 captured by the Taliban and spent five years under brutal captivity by the insurgent group. He had faced up to life in prison after pleading guilty to desertion and misbehavior before the enemy.