(CNN) -- Al Qaeda militants killed American hostage Luke Somers and a South African captive in Yemen during a raid conducted by U.S. forces to rescue Somers, Defense Secretary Chuck Hagel said Saturday.
President Barack Obama ordered Friday's raid because "there were compelling reasons to believe Mr. Somers' life was in imminent danger," Hagel said.
During the raid, the militants with al Qaeda in the Arabian Peninsula (AQAP) also killed South African hostage Pierre Korkie, according to his employer, the relief group Gift of the Givers.
Korkie was to be released on Sunday, the group said in a statement.
He and his wife Yolande had fallen into the hands of abductors in May of last year, but they subsequently let her go. On Friday, a team of local leaders was finalizing arrangements to reunite Pierre Korkie to his wife and children, the statement reads.
Gift of the Givers recently told his wife that "the wait is almost over."
"Three days ago we told her 'Pierre will be home for Christmas,'" the group said. "We certainly did not mean it in the manner it has unfolded."
The President condemned AQAP's killing of the two hostages and explained his decision to authorize the rescue attempt in a statement.
"Earlier this week, a video released by his terrorist captors announced that Luke would be killed within 72 hours," the statement said. "I also authorized the rescue of any other hostages held in the same location as Luke."
In a statement, Secretary of State John Kerry said that a recommendation to authorize the operation had been made to the President.
Obama offered his condolences to Somers' family.
"I also offer my thoughts and prayers to the family of a non-U.S. citizen hostage who was also murdered by these terrorists during the rescue operation," the statement read. "Their despair and sorrow at this time are beyond words."
An Osprey aircraft transported a team of U.S. Navy SEALs to the captives' location. A firefight quickly broke out, and the hostages were loaded onto the plane and flown to a nearby U.S. ship, a U.S. official said.
One of the hostages died before reaching the ship. The other died afterward.
Drones and fighter jets patrolled overhead during the mission.
The U.S. forces who carried out the mission are safe, a U.S. defense official said. Both the President and Kerry praised their valor.
The hostages were being kept at a location close to another where U.S. and Yemeni forces had carried out a previous raid.
This rescue missions was particularly difficult, in part due to Yemen's sparse population, retired Lt. Col. James Reese, global affairs analyst for CNN, said Saturday.
Reese noted that it would have been difficult for the military to travel a significant distance by air and still maintain the element of surprise in a rescue operation.
"It has to take precision," he said. "This is like brain surgery."
A previous attempt
American hostage pleads for his life
It was the second such attempt by U.S. forces in two weeks.
In the first attempt in November, U.S. and Yemeni special forces outfitted with night visors embarked on the mission about a few miles from a cave where AQAP was holding hostages.
A gun battle ensued, and the special forces killed all seven abductors and freed eight hostages. But the militants had separated Somers and four more hostages from the group and moved them to another location two days before the raid.
This week, AQAP released a video threatening to kill Somers and showing the American photojournalist pleading for his life.
A spokesman read a statement saying Somers would meet his inevitable fate if Washington did not meet the terror group's demands. The spokesman did not name the demands but said the U.S. government knew what they were.
They gave U.S. officials three days to comply. That time was due to run out.
Family pleaded for his life
Somers appeared in the AQAP video asking for help and identifying himself.
"My name is Luke Somers. I'm 33 years old. I was born in England, but I carry American citizenship and have lived in America for most of my life," he said.
Somers' brother and mother posted a response video to YouTube in which they pleaded with the militants to spare him.
His brother, Jordan Somers, asked the militants not to fault Somers or his family for the previous rescue attempt.
"He is not responsible for any actions that the U.S. government has taken. Please understand that we had no prior knowledge of the rescue attempt for Luke, and we mean no harm to anyone," Jordan Somers said.
The American hostage was dressed in a nice shirt in the militant video and at least appeared clean and healthy. This did not escape his mother.
Paula Somers thanked them for taking good care of him in the family's response video, but also asked her son be returned to her alive.
"Please show mercy and give us an opportunity to see our Luke again. He is all that we have," she said.