Updated

NATO and Afghan forces launched a daring operation to rescue two female foreign aid workers and their two Afghan colleagues after learning the Taliban planned to kill one of the hostages, an intelligence official said.

The troops carried out the successful mission before dawn Saturday, swooping in on helicopters to pluck the aid workers from a cave in a mountainous area of northern Badakhshan province. They killed the eight militants holding them captive as well, Afghan intelligence spokesman Shafiqullah Tahiri said Sunday.

The militants hoped killing one of the hostages would pressure negotiators to accept their demands of a $1 million ransom and the release of five of their colleagues imprisoned in Kabul, said Tahiri. The insurgents initially asked for at least $4 million before reducing their demand, he said.

Helen Johnston, 28, from Britain, and Moragwa Oirere, 26, from Kenya, and their two Afghan colleagues were kidnapped on May 22 while traveling on horseback in Badakhshan. The four work for Medair, a humanitarian non-governmental organization based near Lausanne, Switzerland.

British Prime Minister David Cameron said Saturday that he approved the operation after becoming increasingly concerned about the safety of the hostages. He said militants should know that Britain does not pay ransoms or trade prisoners, and anyone who kidnaps British citizens "can expect a swift and brutal end."

Troops were able to launch the rescue operation after receiving precise information from Afghan intelligence agents about the hostages' location in Shahri Buzurg district, said Tahiri. The kidnappers were planning to move the hostages to another remote, mountainous location in neighboring Tajikistan, he said.

The militants were armed with heavy machine guns, rocket-propelled grenades and AK-47 assault rifles, but were overwhelmed by British troops operating alongside other NATO and Afghan forces. The hostages were safely rescued, and none of the NATO or Afghan forces were harmed, said the coalition.

Past rescue attempts in Afghanistan have not always gone so well.

In 2009, Sultan Munadi, an Afghan translator kidnapped alongside New York Times reporter Stephen Farrell, was killed in a hail of bullets during a rescue attempt by British commandos. In 2010, the U.S. Navy's SEAL Team 6 tried to rescue Linda Norgrove, a Scottish aid worker, from her Taliban captors in Afghanistan. She was killed by a grenade thrown in haste by one of the American commandos.

In southern Afghanistan on Sunday, a NATO service member was killed in an insurgent attack, the coalition said, without providing further details.

The death raised the number of coalition troops who have died in Afghanistan this year to 179.

___

Associated Press writer Sebastian Abbot contributed to this report.