Officials say U.S. Army Sergeant Bowe Bergdahl has been released after spending nearly five years in captivity by the Taliban in exchange for five Guantanamo Bay detainees.

The exchange was mediated by the Qatari government, Associated Press reports. Bergdahl was captured after reportedly walking away from his base in Paktika province near the Pakistani border. Unconfirmed emails between Bergdahl and his parents show he became disillusioned with his service and the mission in Afghanistan prior to be captured.

President Obama released this statement:

Later, Obama issued a statement in the Rose Garden:

Right now, our top priority is making sure that Bowe gets the care and support that he needs and that he can be reunited with his family as soon as possible.

The U.S. government has not released the names of the detainees exchanged for Bowe. The Taliban requested the release of at least 21 detainees in the past, including Aafia Siddiqui, a Pakistani woman who was sentenced to 86 years in prison on terrorist charges.