(NBC News) - Bowe Bergdahl, an Army sergeant held by the Taliban since 2009, was released Saturday, U.S. officials told NBC News.

Bergdahl, 28, was freed from Afghanistan in exchange for five prisoners who were held at the Guantanamo Bay detention center and is back in the hands of the U.S. military, the officials said.

Bergdahl disappeared when he reportedly walked away from a U.S. military base in eastern Afghanistan in June 2009, carrying only a compass and a bottle of water. He was the only U.S. service member ever to be held captive by enemy forces.

Although he appeared frail and shaky in a “proof of life” video the U.S. obtained in January, officials told NBC News that he is in good condition and able to walk upon his release.

Bergdahl, of Idaho, joined the Army in 2008 and was assigned to the 25th Infantry Division in Fort Richardson, Alaska. Less than a year later, he was deployed as a machine gunner to a combat outpost in Pakita Province, Afghanistan, a militant hotbed.