The dramatic details of how the SAS completed a “brilliant” rescue of a British aid worker and three other female hostages in Afghanistan can be revealed.

Defence sources said the “surgical” operation showed the “precision, skill and courage” of British special forces after they stormed the cave where Helen Johnston, 28, was held, and killed her kidnappers.

David Cameron spoke individually to the soldiers to thank them for an “extraordinarily brave” mission. He warned that anyone who took British citizens hostage faced “a swift and brutal end”.

Miss Johnston, a committed Christian, along with Moragwa Oirere, a Kenyan colleague, and two Afghan women who worked for the same aid agency, were said to be physically well after their ordeal.

Miss Johnston’s parents expressed their gratitude to the SAS and American Navy SEALs from the same unit that killed Osama bin Laden, for freeing their daughter. Mr Cameron spoke to the rescued aid worker as she recovered at the British embassy in Kabul.

The raid was ordered by commanders amid mounting fears that Miss Johnston and the other three captives, who were seized on May 22, were in danger of being killed or handed over to more dangerous terrorists.

On Saturday night, sources said it had been a “classic operation” that was “brilliantly executed” after days of painstaking intelligence gathering. The hostages’ exact location was pinpointed early last week using mobile phone interception technology. Predator drones flying silently at 20,000ft kept their captors under 24-hour surveillance.

International Security and Assistance Force (ISAF) commanders hoped initially that the kidnapping would be resolved peacefully. Shortly after the four women were seized, the kidnappers, who were known to have close links to the Taliban, released a video in which they demanded a £6 million ransom and the release of a comrade.