Bowe Bergdahl: Chuck Hagel praises release special forces
US Defence Secretary Chuck Hagel has praised US forces in Afghanistan over the release of a US soldier held for nearly five years by the Taliban.
Sergeant Bowe Bergdahl, 28, was handed to US special forces in south-eastern Afghanistan as part of a prisoner swap.
Mr Hagel met some of those involved at Bagram airbase north of Kabul during a previously unannounced visit.
In return, five senior Afghan detainees have been released from the Guantanamo Bay detention facility in Cuba.
The Taliban's supreme leader, Mullah Mohammad Omar, has reportedly hailed their release.
"I extend my heartfelt congratulations to the entire Afghan Muslim nation, all the mujahideen and to the families and relatives of the prisoners for this big victory regarding the release of five Taliban leaders from Guantanamo prison," he said in a statement quoted by the AFP news agency.
The Pentagon has been criticised for not giving Congress the required 30-day notification before releasing the detainees from Guantanamo Bay.
But Mr Hagel, who has reportedly met some of the special forces team involved in the operation - said the military believed the soldier was in danger, and had to act quickly "essentially to save his life".
"No shots were fired," said Mr Hagel of the prisoner hand-over. "It went as well as it could have."
While hopeful the prisoner exchange could lead to a breakthrough in negotiations with the Taliban, Mr Hagel said getting Sgt Bergdahl back had been the priority.
Afghan President Hamid Karzai was informed of the prisoner-swap "after the fact", he added.
Sgt Bergdahl, who is said to be in good condition, was the only US soldier being held by the Taliban in Afghanistan.
"While Sgt Bergdahl was gone he was never forgotten," said President Barack Obama during a White House lawn press conference with the soldier's parents on Saturday.
Robert and Jani Bergdahl said they were "joyful and relieved" to hear of their son's release, adding that he was having trouble speaking English due to his long captivity.
Mr Obama says he has security guarantees from Qatar - which mediated the deal and where the five Afghan men have been flown - "that it will put in place measures to protect our national security".
Under the deal, they will be banned from leaving Qatar for at least a year.
Analysis: David Loyn, BBC News, Kabul
Negotiations for the US-Taliban prisoner swap began three years ago. US negotiators met Taliban leaders face to face in Qatar, but Taliban sources told me that the talks did not move forward because the US was pushing for a wider peace process, while the Taliban wanted to limit the talks to a prisoner swap.
The Afghan government blocked further progress a year ago, enraged when the Taliban opened a political office in Qatar. But using Qatar as a mediator, the US continued talks in secret. A US source said that the breakthrough came recently when hardline Taliban elements agreed to the swap. The US believes that Bergdahl was held across the frontier in Pakistan for most of his captivity.
It is unclear what impact the release will have on a wider peace process. The Afghan High Peace Council want talks with the Taliban to happen inside Afghanistan not outside, and do not want to involve the Americans.
'Looking for a long time'
Taliban officials say the soldier was handed over near Khost, close to the the Afghan-Pakistan border, on the evening of 31 May.
A several-dozen strong US special forces team flew in by helicopter and briefly met some 18 Taliban fighters on the ground.
Once the helicopter was in the air, Bergdahl wrote the letters "SF?" on a paper plate - an abbreviation for special forces - and reportedly broke down when the men responded: "Yes, we've been looking for you for a long time."
He has been flown to a US military medical centre in Germany, where he will receive treatment and begin the process of acclimatising and reconnecting with his family through telephone and video calls before returning to the US.
The soldier, of Hailey, Idaho, was serving with an infantry regiment in Paktika province near the Pakistani border and went missing on 30 June 2009, months after being deployed to Afghanistan.
The circumstances of his capture remain unclear, with speculation he may have walked away from his base out of disillusionment with the US campaign.
US officials say any decision over possible desertion charges will be made by the army, but there is a feeling the soldier has suffered enough.
Throughout his captivity, the soldier's hometown had continued to remember him with special events and yellow ribbons tied to trees.
Who are the Guantanamo detainees?
Mohammad Fazl served as the Taliban's deputy defence minister during America's military campaign in 2001. Accused of possible war crimes, including the murder of thousands of Shia Muslims.
Khirullah Khairkhwa was a senior Taliban official serving as interior minister and governor of Herat, Afghanistan's third largest city. Alleged to have had direct links to Osama bin Laden.
Abdul Haq Wasiq was the Taliban's deputy minister of intelligence. Said to have been central in forming alliances with other Islamic fundamentalist groups to fight against US and coalition forces.
Mullah Norullah Noori was a senior Taliban military commander and a governor. Also accused of being involved in the mass killings of Shia Muslims.
Mohammad Nabi Omari held multiple Taliban leadership roles, including chief of security. Alleged to have been involved in attacks against US and coalition forces.