A US commando was killed during a mission to rescue an American doctor kidnapped by the Taliban in eastern Afghanistan, the White House has said.
President Barack Obama said the US rescue team had shown "selfless service" in carrying out the raid.
Earlier, US officials said Dr Dilip Joseph had been freed in a joint operation by US and Afghan forces.
They said that seven of his captors died in the operation but did not reveal the US casualty until later.
"Our special operators in Afghanistan rescued an American citizen in a mission that was characteristic of the extraordinary courage, skill and patriotism that our troops show every day," the White House said in a statement.
"Tragically, we lost one of our special operators in this effort. Our thoughts and prayers go out to his family, just as we must always honour our troops and military families."
President Obama said the rescue mission "was characteristic of the extraordinary courage, skill and patriotism that our troops show every day".
US Defence Secretary Leon Panetta described the commando - who has not been named - as a "fallen hero" and said the special forces represented the "highest ideals of citizenship, sacrifice and service".
Dr Joseph and two Afghan colleagues from the Morning Star Development aid group were captured by Taliban insurgents on 5 December while returning from a rural medical clinic in the Sarobi district of Kabul province, near the Afghan capital.
Morning Star said the three were stopped while driving and captured by a group of armed men.
They were then taken to a mountainous area about 80km (50 miles) from the Pakistan border.
US commander in Afghanistan, Gen John Allen, said he ordered the mission when intelligence showed the doctor was in danger of being killed or injured.
No details have been released about the pre-dawn military operation on Sunday.
After the rescue, Dr Joseph was said to be in good health and was undergoing medical checks before returning to the US.
Dr Joseph's aid agency says he is a medical adviser who travels frequently to Afghanistan.
Morning Star Development is a US-registered non-profit organisation which says it aims to help the Afghan people through economic and community development.
Sarobi district was returned to the control of Afghan forces in April. French troops had been in command until then. France ended its combat operations in Afghanistan last month.