NATO special forces rescued two foreign women and killed five kidnappers in a "breath-taking" pre-dawn raid on Saturday on a cave in Afghanistan's remote and mountainous Badakhshan province.
The women, who worked for Swiss-based charity Medair, were named as Briton Helen Johnston, 28, and Kenyan Moragwe Oirere, 26. Two Afghan colleagues kidnapped with them on May 22 were also freed unharmed.
All are well, Afghan officials told AFP.
"The mission to rescue the hostages was launched in the early hours of today under cover of darkness with the assistance of helicopters," a spokesman for NATO'S International Security Assistance Force said.
"The hostages were being held in a cave in the mountains."
British forces took part in the operation, which was authorised by Prime Minister David Cameron, the British Foreign Office (FCO) said.
The prime minister said he authorised the rescue attempt on Friday afternoon, after becoming increasingly concerned about the safety of Johnston and her colleagues.
"It was an extraordinarily brave, breath-taking even, operation that our troops had to carry out," he said. "I pay tribute to their skill and dedication."
The victims were seized at gunpoint while travelling on horseback to relief project sites in Badakhshan in northeastern Afghanistan.
They were visiting relief nutrition, hygiene and health project sites when captured, Medair said in a statement Saturday. It is not known what demands the kidnappers had made.
But Cameron said the rescue should serve as a warning to terrorists across the world who take British citizens hostage.
"They should know if they take British citizens as hostage we do not pay ransoms, we do not trade prisoners.
"They can expect a swift and brutal end."
The two women were now receiving support from British embassy staff in Kabul, while the two Afghan aid workers were returning to their families in Badakhshan, the Foreign Office said.
"Staff from the FCO remain in close contact with Helen's family who are understandably hugely relieved at this news.
"We are also in touch with Moragwa's family and with the Afghan and Kenyan governments, and Medair have been in close contact with the families of the Afghan aid workers."
ISAF commander General John R. Allen thanked the Afghan interior ministry for its "tremendous support throughout this crisis".
He said the mission "exemplifies our collective and unwavering commitment to defeat the Taliban".
"I'm extremely grateful to the Afghan authorities and proud of the ISAF forces that planned, rehearsed, and successfully conducted this operation."
Impoverished Badakhshan has been mainly quiet but there have been pockets of insurgent activity.
Both criminals and Taliban insurgents waging a war against the Western-backed government of President Hamid Karzai have been responsible for kidnappings in the past, but Allen's comment suggests that the kidnappers in this case were Taliban.
In August 2010, the Taliban claimed responsibility for killing a group of eight medical aid workers in Badakhshan, claiming they were "Christian missionaries".
The rescue shows the vital importance of NATO's air power and highly-skilled special forces in the war against the Taliban.
The alliance will be pulling its combat troops out of Afghanistan by the end of 2014 and is training Afghan forces to take over responsibility for security.© ANP/AFP