A NATO rescue team dropped by helicopter in the remote mountains of northern Afghanistan freed four aid workers who had been seized by the Taliban last month.
The aid workers, employed by Swiss-based Medair, were en route to flood-stricken parts of Badakhshan when they were kidnapped.
Helen Johnston from east Belfast and Kenyan national Moragwe Oirere were taken hostage along with three Afghan civilians on 22 May.
One of the hostages managed to escape before the rescue mission late last night.
A spokesman for the NATO-led International Security Assistance Force said said the rescue team suffered no casualties in the operation.
The kidnappers were armed with heavy machine guns, AK-47 assault rifles, and rocket-propelled grenades.
British Prime Minister David Cameron, welcoming the freeing of the hostages, said their lives were increasingly in danger.
He said it was an operation in which British troops were involved, and that a number of Taliban and hostage takers were killed.
The kidnapping of foreigners has become relatively common in parts of Afghanistan since US-backed Afghan forces toppled the Taliban government in 2001.
In 2010, 10 foreign medical workers, including six Americans, were killed in Badakhshan in an attack blamed on insurgents.
Police in Badakhshan said the gunmen in the latest incident belonged to criminal groups who were taking advantage of the difficult terrain and the loose grip that Afghan security forces have on the area.
The aid workers had been travelling by donkey to visit a clinic in the remote Yawan district, where the road had been destroyed by floods caused by melting snow after one of the worst Afghan winters in decades.
Afghan forces have taken over security in the provincial capital Faizabad and some parts of Badakhshan ahead of the withdrawal of Western combat forces in 2014.