This is an archived article and the information in the article may be outdated. Please look at the time stamp on the story to see when it was last updated.

WASHINGTON (AP) — The only American solider held prisoner in Afghanistan has been freed in a deal with the Taliban.

Bowe Bergdahl (boh BURG’-dahl) is back at the main U.S. base in Afghanistan after being freed from nearly five years in captivity. Officials say the 28-year-old sergeant from Idaho is getting a medical evaluation at Bagram (bah-GRAHM’) Air Field before heading home to the United States.

Obama administration officials say Bergdahl was handed over to U.S. Special Forces in eastern Afghanistan following secret, indirect negotiations with the Taliban. In exchange, five Afghans detained at Guantanamo are being released to the custody of Qatar.

The 28-year-old sergeant is said to be in good condition when he was handed over to U.S. Special Forces on. He’d been held captive since 2009.