WASHINGTON (AP) — U.S. officials say the only American soldier held prisoner in Afghanistan has been freed and is in U.S. custody.

The officials say Sgt. Bowe Bergdahl's release was part of a negotiation that includes the release of five Afghan detainees held in the U.S. prison at Guantanamo Bay, Cuba.

The negotiation between the U.S. and the Taliban was mediated by the government of Qatar.

The 28-year-old Berghdal had been held by the Taliban since June 30, 2009. The officials say he is in good condition and able to walk.

The officials insisted on anonymity in order to describe the details on Bergdahl'srelease.

Copyright 2014 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.

More From 99.9 KTDY