It was "right to try" and rescue the captured British aid worker Linda Norgrove, David Cameron has said.
Norgrove was fatally wounded as American special forces attempted to free the 36-year-old from her captors in Afghanistan.
Norgrove was kidnapped two weeks ago when she and the two-car convoy carrying her and three colleagues was ambushed in Kunar province - a well-known militant area.
An Afghan intelligence official, who spoke on condition of anonymity, said the rescue team was closing in on the property where Norgrove was being held when her captors threw a grenade into the room where she was kept, killing her.
Allied troops then opened fire, killing all of the militants in the property.
Prime Minister David Cameron said in a statement: "My thoughts are with Linda's family, who will be devastated by this tragic news. She was doing valuable work for the Afghan people."
"Decisions on operations to free hostages are always difficult.
"But where a British life is in such danger, and where we and our allies can act, I believe it is right to try."