Sergeant Bowe Bergdahl, the only American soldier still in captivity in Afghanistan, was released and returned to U.S. special operations forces Saturday. Berghdal had been held since 2009, when he was captured in Afghanistan’s Paktika Province.

Berghdal was released in exchange for five Afghan Taliban prisoners held at Guantanamo Bay, who have been delivered into Qatari custody, officials said.

“While Bowe was gone, he was never forgotten. His parents thought about him and prayed for him every single day,” President Barack Obama said alongside Bergdahl’s parents at the White House Saturday. “And he wasn’t forgotten by his country, because the United States of America does not ever leave our men and women in uniform behind.”

The five prisoners are Mohammad Fazl, Mullah Norullah Noori, Mohammed Nabi, Khairullah Khairkhwa and Abdul Haq Wasiq, an administration official confirmed.

According to a senior Defense official, the handover occurred at approximately 10:30 am Eastern time Saturday along the eastern Afghanistan border with Pakistan, and took place quickly without incident, peacefully and without violence. Berghdal was in the custody of about 18 Taliban fighters and was ushered onto a waiting helicopter by U.S. special operations forces. Once aboard, Berghdal wrote on a paper plate “SF?,” asking over the loud aircraft engines whether he was being rescued by special forces operators. The official said the troops replied loudly “yes, we’ve been looking for you for a long time.” Berghdal then broke down crying.

Bergdahl is currently being held at a U.S. forward operating base under the care of American doctors until he is cleared for further travel, at which point he will be transferred to Bagram Airfield.

A 23-year-old private first class at the time of his capture on June 30, 2009, Bergdahl, a native of Hailey, Idaho, was promoted twice during his captivity to the rank of sergeant and is now 28 years old. American officials believe he spent much of his captivity in Pakistan and are not sure when he was moved to Afghanistan for the transfer. The last video showing proof that Berghdal was still alive was seen in January of this year.

This file image provided by IntelCenter on Dec. 8, 2010, shows a frame grab from a video released by the Taliban containing footage of a man believed to be Bowe Bergdahl, left. IntelCenter/AP

President Barack Obama called Berghdal’s parents Saturday morning to inform them of their son’s release. “We were so joyful and relieved when President Obama called us today to give us the news that Bowe is finally coming home! We cannot wait to wrap our arms around our only son,” the Bergdahl family said in a statement. “Today, we are ecstatic!”

The U.S. began efforts to bring about Afghan reconciliation with the Taliban in late 2010, and since May 2011 Bergdahl’s release has “been a central element of our reconciliation efforts,” a senior administration official said Saturday. The transfer was not directly negotiated with the Taliban, but through the Amir of Qatar, officials said, whose help is being called “instrumental” to the agreement. Talks to bring about Berghdal’s release resumed only in the last several weeks, after the Taliban showed interest in resuming dialogue regarding Berghdal and its prisoners being held at Guantanamo. Obama called the Amir Tuesday to confirm the transfers, and the Qataris facilitated the handing over of Bergdahl.

The announcement comes days after President Obama announced that the U.S. combat role in Afghanistan will end this year, pending a complete withdrawal of American troops by the end of 2016.

“Today the American people are pleased that we will be able to welcome home Sergeant Bowe Bergdahl, held captive for nearly five years,” Obama said in a statement Saturday. “Sergeant Bergdahl’s recovery is a reminder of America’s unwavering commitment to leave no man or woman in uniform behind on the battlefield.”

Secretary of Defense Chuck Hagel said Qatar is taking security precautions with the former Guantanamo prisoners to ensure U.S. safety is not compromised. “The United States government never forgot Sgt. Bergdahl, nor did we stop working to bring him back,” Hagel said in a statement. The former detainees will be under a travel ban for a year, and will be subjects to other restrictions on their movement and activities, official said.

Secretary of State John Kerry called Afghan President Hamid Karzai to brief him on the agreement Saturday, he said in a statement.

American officials indicated they believe the transfer will ease the way for reconciliation with the Taliban. “By conducting successful indirect talks with the Taliban’s political commission, this transfer was a part of a broader reconciliation framework,” a senior administration official said.

Sen. John McCain (R-Ariz.), a former Vietnam war P.O.W., said in a statement Saturday that “all Americans share in the joy that the Bergdahl family feels today and for which they have waited so long.” However, he also expressed skepticism about the future of the five prisoners transferred from Guantanamo.

“I am eager to learn what precise steps are being taken to ensure that these vicious and violent Taliban extremists never return to the fight against the United States and our partners or engage in any activities that can threaten the prospects for peace and security in Afghanistan,” added McCain.

Contact us at letters@time.com.