An American hostage and a South African national held hostage by al Qaeda in Yemen died during a rescue rescue operation in the intervening night of Saturday and Friday.
Luke Somers, the American, and Pierre Korkie, the South African, were both killed by militants, US defense secretary Chuck Hagel said in a statement.
In a separate statement, US President Barack Obama said he ordered the raid, following a failed attempt last month, as Somers’s life was in “imminent danger”. He condemned the "barbaric murder" of Somers, was kidnapped more than a year ago in the Yemeni capital Sanaa.
In a video released earlier this week, al Qaeda in the Arabian Peninsula (AQAP) had threatened to kill Somers if their demands were not met, probably the payment of ransom, which the US as a matter of policy doesn’t pay.
Officials said they believed Somers was to be killed on Saturday.
US special ops personnel found the hostages wounded but alive. Korkie died on a flight while being evacuated, and Somers on an operating table on a US navy ship anchored close by.
US commandos were within 100 yards of the compound where the hostages were held, when the militants are reported to have been alerted about their presence.
The terrorists apparently heard some noise -- possibly a dog barked, according to an account of the raid leaked to US news outfits, and opened fire on the raiders creeping up.
After a few minutes of shooting, one of the terrorists went into the building where the hostages were being held, according to officials.
The man returned shortly, perhaps after shooting the hostages.
They were still alive when the raiders reached them. Medics on the team tried to stanch the bleeding, and put them on a helicopter equipped with life-saving equipment.
The Gift of the Givers, a charity that had been negotiating Korkie's release, said the South African's death came a day before he was due to be freed after more than a year in captivity.
"The psychological and emotional devastation to (his wife) Yolande and her family will be compounded by the knowledge that Pierre was to be released by al Qaeda tomorrow (Sunday)," it said.
The South African couple, who had worked as teachers in Yemen for four years, were seized by al Qaeda in May 2013 in the city of Taez. The wife was released in January following mediation by Gift of the Givers.
The charity said logistical arrangements had already been put in place to fly Pierre Korkie out of Yemen under diplomatic cover after negotiations.
"It is even more tragic that the words we used in a conversation with Yolande at 5.59 this morning was 'the wait is almost over'.
"Three days ago we told her 'Pierre will be home for Christmas'. We certainly did not mean it in the manner it has unfolded."
Ten militants were killed in the joint operation in Shabwa province in southeast Yemen, Yemen's defence ministry said.
A tribal leader said soldiers were seen parachuting into the area and residents reported heavy clashes.
'Despicable terrorist organisation'
Obama said that since the abduction of Somers 15 months ago, Washington had been using "every tool at our disposal" to try to secure his release.
"Luke was a photojournalist who sought through his images to convey the lives of Yemenis to the outside world," Obama added.
"He came to Yemen in peace and was held against his will and threatened by a despicable terrorist organisation."
The United States has said that American and Yemeni forces had already tried unsuccessfully to rescue Somers last month.
According to Yemen's defence ministry, al Qaeda moved hostages, including the US journalist, a Briton and a South African, days before that US-Yemeni raid in southeastern Hadramawt province.
The whereabouts of the Briton are unknown.
Yemeni officials said eight other hostages were freed in the earlier operation.
Yemen is a key US ally in the fight against al Qaeda, allowing Washington to conduct a long-standing drone war against the group on its territory.
AQAP is considered by Washington to be the most dangerous affiliate of al Qaeda.
The execution threat by AQAP followed the murder of five Western hostages since August by the Islamic State group that controls parts of Syria and Iraq.
Two US journalists, James Foley and Steven Sotloff, American aid worker Peter Kassig and British aid workers Alan Henning and David Haines were all beheaded.
Al Qaeda has exploited instability in impoverished Yemen since a 2011 uprising forced president Ali Abdullah Saleh to step down.
In recent years there has been a growing number of abductions in Yemen by al Qaeda.
The militants remain active in southern and eastern regions of Yemen despite several military campaigns by government forces.
al Qaeda militants have allied with Sunni tribesmen in southern Yemen to halt the advance of Shiite Huthi militias who seized Sanaa in September unopposed, and who have since extended their control to coastal areas and regions south of the capital.
(with AFP inputs)