Sergeant Bowe Bergdahl, 28, was handed to US forces after being held for nearly five years by the Taliban.
He has left Afghanistan and is en route to a US military hospital in Germany.
Five Afghan detainees were released from the US prison in Cuba and handed to Qatar, which mediated the deal.
Sgt. Bowe Bergdahl, who is said to be in good condition, was the only US soldier being held by the Taliban in Afghanistan.
His parents said they were “joyful and relieved” to hear of their son’s release.
Hours after the release, President Barack Obama told reporters the Qatari government had given the US assurances “that it will put in place measures to protect our national security”.
He also thanked the Qatari authorities for their role in acting as a go-between during indirect US-Taliban negotiations that led to the deal.
The exchanged prisoners are thought to be the most senior Afghans still held at Guantanamo. Under the deal, they will be banned from leaving Qatar for at least a year.
The Taliban said they welcomed their release with “great happiness”.
“While Sgt. Bergdahl was gone he was never forgotten,” Barack Obama said, adding that the US had an “ironclad commitment” to bringing home its prisoners of war.
He was joined by Sgt. Bowe Bergdahl’s parents, Robert and Jani, at the White House on Saturday. They offered thanks to those who took part in securing their son’s freedom.
In an emotional speech, Robert Bergdahl said his son was having trouble speaking English after his rescue.
Officials said the Taliban had handed Sgt. Bowe Bergdahl over on Saturday evening, local time, in eastern Afghanistan, in an exchange that involved several dozen US special forces.
Bowe Bergdahl, of Hailey, Idaho, was captured on June 30 2009, about two months after arriving in eastern Afghanistan.
In January, the US military obtained a new video of Sgt. Bowe Bergdahl, giving his family renewed hope of his eventual return.
dm6u4voY44gAt least 158 people have died in Spain's worst flooding disaster in generations. On October…
Google has been fined two undecillion (a two followed by 36 zeroes) roubles by a…
Embarking on a home remodel is an exciting journey, promising enhanced comfort, increased property value,…
The US presidential candidates continued to campaign across key swing states on October 20. Footage…
Elon Musk has said he will give away $1 million a day to a registered…
India and Canada have decided to expel their top envoys along with other diplomats as…