Analysis: US counterterrorist operations that went wrong
This is not the first time a secret US counterterrorist or special operations mission has ended up inadvertently killing Western hostages.
In 2010, British aid worker Linda Norgrove, kidnapped by the Afghan Taliban, was killed by a grenade thrown by one of her would-be rescuers.
Last December, a US commando raid in Yemen resulted in the deaths of an American photojournalist and a South African teacher, both shot by their al-Qaeda captors.
But in the incident announced on Thursday by President Barack Obama, US intelligence seems to have been unaware that two Western hostages - US doctor Warren Weinstein and Italian aid worker Giovanni Lo Porto - were being held in the very same compound that was to be targeted in an unmanned aerial drone strike.
Despite what the US president referred to as "hours of surveillance footage", the US intelligence picture turned out to be tragically incomplete.
This points to the extraordinary difficulties of operating in remote, mountainous, and often forested terrain where there is little government presence or control.
It also points to a very high level of "opsec" (operational security) by those holding the hostages, who will have gone to great lengths to give nothing away - either visually or digitally - about the whereabouts of their prisoners.
The human rights pressure group Reprieve has criticised what it calls US double standards in apologising publicly over the deaths of Westerners in a drone strike while staying silent on the deaths of many Yemenis and Pakistanis killed in other drone strikes over the years.
The presidential announcement also revealed the US belief that in a separate attack it had killed al-Qaeda's first native American spokesman, known as Adam Gadahn al-Amriki.
Born Adam Pearlman and raised on a Californian goat farm, he converted to Islam as a teenager. From 2004 onwards, he became a prolific propagandist for Osama Bin Ladin's organisation, speaking in his fluent native English with a strong American accent.
After all of the Arabic video messages subtitled into English, Gadahn's clearly enunciated, well-argued, but ultimately nihilistic speeches came as a shock for Western audiences.
Here for the first time was someone raised in their culture who was speaking officially on behalf of the organisation that brought such destruction to America on 9/11.
But in recent years he has had a lower profile as what remains of core Al-Qaida has been eclipsed by the territorial conquests and extreme violence of Islamic State.
His place as an English-speaking jihadi propagandist has been taken by numerous Westerners speaking on social media from war-torn corners of Iraq and Syria.