Last Updated May 31, 2014 7:30 PM EDT
WASHINGTON - The only American solider held prisoner in Afghanistan has been freed and is back in U.S. custody after nearly five years of captivity, U.S. officials said Saturday.
The officials said the Taliban agreed to turn over Sgt. Bowe Bergdahl in exchange for the release of five Afghan detainees from the U.S. prison at Guantanamo Bay, Cuba. The transfers happened after a week of intense negotiations mediated by the government of Qatar, which will take custody of the Afghans.
A senior Defense Department official told CBS News Bergdahl was rescued by special operations forces in eastern Afghanistan, though he was believed to be held in Pakistan. The transfer took place quickly and without incident. There were approximately 18 Taliban on site.
According to a senior defense official traveling with Defense Secretary Chuck Hagel in Singapore, once Bergdahl climbed onto the noisy helicopter he took a pen and wrote on a paper plate, the letters "SF?" - asking the troops if they were special operations forces.
They shouted back at him over the roar of the rotors: "Yes, we've been looking for you for a long time."
Then, according to the official, Bergdahl broke down and cried.
Officials said Bergdahl was transferred to Bagram Air Field, the main U.S. base in Afghanistan, for medical evaluations, before eventually heading on to the United States.
President Barack Obama spoke about Bergdahl on Saturday from the Rose Garden and said he was never forgotten.
"While Bowe was gone, he was never forgotten," Obama said, flanked by Bergdahl's parents, Bob and Jani Bergdahl. "His parents thought about him and prayed for him every single day as did his sister, Sky, who prayed for his safe return," "He wasn't forgotten by his community in Idaho or the military, which rallied to support the Bergdahls through thick and thin. 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."
Bob Bergdahl, who grew a long, thick beard to honor his son, said Bowe Bergdahl was having trouble speaking English after his rescue. The elder Bergdahl had worked to learn Pashto, the language spoken by his son's captors, and delivered him a message in that language.
Switching back to English, he said "the complicated nature of this recovery will never really be comprehended."
Earlier Saturday, Bergdahl's parents released a statement saying they are "ecstatic."
"We want to take this opportunity to thank all those in the many U.S. Government agencies who never gave up," the parents said.
Previously, Bergdahl's parents had been critical of the efforts to free their son.
In a statement earlier Saturday, the president thanked the amir of Qatar for negotiating Bergdahl's release.
"The amir's personal commitment to this effort is a testament to the partnership between our two countries," Obama said. "The United States is also grateful for the support of the Government of Afghanistan throughout our efforts to secure Sergeant Bergdahl's release."
Hagel said in a statement the Guantanamo detainees have been transferred to Qatar.
"The United States has coordinated closely with Qatar to ensure that security measures are in place and the national security of the United States will not be compromised," Hagel said.
A Defense Department official tells CBS News the former detainees will be in Qatar for at least a year until they are allowed to move on. While there, the former detainees will be subject to restrictions on their movement and activities.
Officials said the Taliban turned the 28-year-old Bergdahl over Saturday evening, local time, in Afghanistan.
Bergdahl was in good condition and able to walk, according to the officials, who insisted on anonymity in order to describe the details of his release. Bergdahl is expected to be transferred to Bagram Air Field, the main U.S. base in Afghanistan, then on to the United States.
Bergdahl, of Hailey, Idaho, had been held by the Taliban since June 30, 2009.
A senior administration official said the release of Bergdahl and transfer of the Guantanamo detainees is part of "a broader reconciliation framework" between the U.S. and the Taliban.
"U.S. efforts to facilitate reconciliation with the Taliban began in November 2010, and since May 2011 the recovery of Sgt. Bergdahl has been a central element of our reconciliation efforts," the official said. "For all that time, our efforts have been coordinated at the highest levels of the U.S. government."
Officials said the Taliban signaled to the U.S. in November that they were ready to start new talks on the issue of detainees. After the U.S. received proof that Bergdahl was still alive, indirect talks began, with Qatar sending messages back and forth between the two parties.
The talks intensified about a week ago, officials said, resulting in Bergdahl's release and the transfer of the Afghan detainees.
Questions had arisen about the nature of Bergdahl's imprisonment. Some had accused Bergdahl of willingly walking away from his unit, which was deployed in Paktika province in eastern Afghanistan, adjacent to the border with Pakistan.
A transcript of radio intercepts, publicly released through Wikileaks, indicates that Bergdahl, then 23, was captured while sitting in a makeshift latrine.
"We were attacking the post he was sitting," according to a radio intercept of a conversation among insurgents. "He had no gun with him. ... They have all (the) Americans, ANA (Afghan National Army), helicopters, the planes are looking for him. Can you guys make a video of him and announce it all over Afghanistan that we have one of the Americans?"
Rolling Stone magazine quoted emails Bergdahl is said to have sent to his parents that suggest he was disillusioned with America's mission in Afghanistan, had lost faith in the U.S. Army's mission there, and was considering desertion.
Bergdahl told his parents he was "ashamed to even be American." Bergdahl, who mailed home boxes containing his uniform and books, also wrote: "The future is too good to waste on lies. And life is way too short to care for the damnation of others, as well as to spend it helping fools with their ideas that are wrong."
Bergdahl was captured by men loyal to the Haqqani Network, a militant group based across the border in North Waziristan, Pakistan, reports CBS News' Jere van Dyk.
The Haqqani network is tied to, but not directly under the control of, Mullah Muhammad Omar, leader of the Afghan Taliban.
Bergdahl would have been taken away quickly on narrow paths through steep, rolling mountains and pine forests, through valleys, past small villages, and then down across the unmarked border into Pakistan.
The patriarch of the Haqqani Network is Jalaladin Haqqani, who was a U.S. ally in the 1980s, when America supplied his militants with billions of dollars in weaponry to fight the Soviet Union, which had invaded Afghanistan.
A U.S. official told CBS News the Guantanamo detainees involved in the swap are as follows: Khairullah Khairkhwa, an early member of the Taliban in 1994, who surrendered to President Hamid Karzai's brother just before he was captured in January 2002 and whose most prominent position was as Governor of Herat Province from 1999 to 2001; Mullah Norullah Noori, who served as Governor of Balkh Province in the Taliban regime and played some role in coordinating the fight against the Northern Alliance; Mohammad Fazl who commanded the main force fighting the U.S.-backed Northern Alliance in 2001 and served as chief of army staff under the Taliban regime and who was also accused of war crimes during the Afghan civil war in the 1990s; Abdul Haq Wasiq, who was the deputy chief of the Taliban regime's intelligence service and the cousin of the head of the service; and Mohammed Nabi, who was a minor Taliban official in Khost Province.