A South African hostage killed during a U.S.-led raid to free him and an American captive from Al Qaeda militants in Yemen was to have been released Sunday, an aid group has claimed.

The South Africa-based Gift of the Givers said Saturday that a deal had been reached late last month to free teacher Pierre Korkie, 56, that included a "facilitation fee" paid to his kidnappers. Korkie had been kidnapped along with his wife, Yolande, in the Yemeni city of Tazi 18 months earlier while doing relief work. She had been released in January of this year without ransom.

"A team of Abyan (Yemeni) leaders met in Aden [Saturday] morning and were preparing the final security and logistical arrangements, related to hostage release mechanisms, to bring Pierre to safety and freedom," Imtiaz Sooliman, founder of Gift of the Givers. "It is even more tragic that the words we used in a conversation with Yolande at 5:59 [Saturday] morning was: 'The wait is almost over.'"

The Associated Press, citing sources close to the negotiations, reported that the militants had initially demanded a $3 million ransom for Korkie's release. Although that demand was dropped, the kidnappers did insist on the "facilitation fee," according to the aid group. The undisclosed amount was raised by Korkie's family and friends, according to the South African Press Agency.

U.S. officials said Korkie and American freelance photographer Luke Somers were apparently shot by an Al Qaeda militant early in a roughly 5-to-10 minute firefight after the team of roughly 40 U.S. commandos were discovered approaching the compound where the men were held. Officials said that based on the location where Somers and Korkie were being held, there was no possibility that they were struck by American gunfire.

U.S. forces pulled Somers and Korkie onto V-22 Ospreys, and medical teams began performing surgery in midair. One hostage died during the short flight; the second died after the Ospreys landed on the USS Makin Island, a Navy ship in the region.

No American forces were killed or sustained serious injuries in the raid. Yemen's government said four of its forces were wounded.

The predawn raid was the second rescue attempt in as many weeks to free Somers following a threat late Wednesday by Al Qaeda in the Arabian Peninsula, backed by intelligence reports, that he would be killed on Saturday morning unless unspecified demands were met.

President Barack Obama said he ordered the raid because Somers was believed to be in "imminent danger." The president, in a statement, condemned Somers' killing as a "barbaric murder," but did not mention Korkie by name, offering condolences to the family of "a non-U.S. citizen hostage."

"It is my highest responsibility to do everything possible to protect American citizens," Obama said. "As this and previous hostage rescue operations demonstrate, the United States will spare no effort to use all of its military, intelligence and diplomatic capabilities to bring Americans home safely, wherever they are located."

On Nov. 25, American special operations forces and Yemeni soldiers raided a remote Al Qaeda safe haven in a desert region near the Saudi border. Eight captives, including Yemenis, a Saudi and an Ethiopian, were freed, but Somers was not there. He and five other hostages had been moved days earlier, officials later said.

Roughly a dozen people are believed held by Al Qaeda militants in Yemen.

U.S. officials said that threat prompted Obama to move quickly. Using information obtained during the first raid, U.S. officials believed Somers was being held Shabwa province, a stronghold of Al Qaeda in the Arabian Peninsula, the terrorist group's Yemeni branch. Officials believed a second hostage was there, too, but did not know it was Korkie.

By Thursday evening, the Pentagon had sent the White House a proposed plan, which Obama approved the following day. Officials alerted Yemen's President Abed Rabbo Mansour Hadi, who gave his support.

Hadi has been a critical U.S. partner in seeking to undermine Yemen's dangerous Al Qaeda affiliate. With the permission of Yemen's government, the U.S. has for years launched drone strikes against militant targets in the country and provided Yemen with hundreds of millions of dollars in security assistance. Civilian casualties from the drone strikes have stoked anger in the country, however.

When Obama announced U.S. airstrikes this year against militant targets in Syria and Iraq, he held up the Yemen effort as a comparable model.

Yemen's highest security body, the Supreme Security Committee, issued a rare statement Saturday acknowledging that the country's forces had carried out the raid with "American friends." The committee said all the militants holding the hostages were killed in the operation.

Korkie was a dedicated teacher, a family friend said. "Teaching was his life. His heart took him to Yemen. He loved teaching the poor," said Daan Nortier, who is acting as a family spokesman.

Lucy Somers, the photojournalist's sister, told The Associated Press that she and her father learned of her brother's death from FBI agents just after midnight Saturday.

"We ask that all of Luke's family members be allowed to mourn in peace," she said, speaking from Kent, England.

Somers was kidnapped in September 2013 as he left a supermarket in Sanaa, according to Fakhri al-Arashi, chief editor of the National Yemen, where Somers worked as a copy editor and a freelance photographer during the 2011 uprising in Yemen.

Before her brother's death, Lucy Somers released an online video describing him as a romantic who "always believes the best in people." She ended with the plea: "Please let him live."

In a statement, Somers' father, Michael, also called his son "a good friend of Yemen and the Yemeni people" and asked for his safe release.

Fuad Al Kadas, who called Somers one of his best friends, said Somers spent time in Egypt before finding work in Yemen. Somers started teaching English at a Yemen school but quickly established himself as a one of the few foreign photographers in the country, he said.

"He is a great man with a kind heart who really loves the Yemeni people and the country," Al Kadas wrote in an email from Yemen. He said he last saw Somers the day before he was kidnapped.

Al-Arashi, Somers' editor at the National Yemen, recalled a moment when Somers edited a story on other hostages held in the country.

"He looked at me and said, 'I don't want to be a hostage,'" al-Arashi said. "'I don't want to be kidnapped.'"

The Associated Press contributed to this report.