Story highlights State Department didn't know other hostage was South African, official tells CNN

Luke Somers "was really dedicated to Yemen," acquaintance tells CNN

Somers, a photojournalist, was captured in September last year

South African hostage Pierre Korkie was to be released on Sunday

The element of surprise was lost in a failed U.S. military raid to rescue two hostages being held by al Qaeda militants in Yemen, a senior Defense Department official said Saturday.

American photojournalist Luke Somers and South African Pierre Korkie , a "respected teacher" who was to be released on Sunday, were fatally shot in the compound by a terrorist as the secret mission unfolded, a U.S. official said.

The relief group Gift of the Givers , which was helping secure Korkie's release, had recently informed his wife that "the waiting is almost over."

"Three days ago, we told her 'Pierre will be home for Christmas,'" said the group, which identified the South African hostage as Korkie. "We certainly did not mean it in the manner it has unfolded."

He was an "innocent man, a respected teacher," Korkie's wife, Yolande, said in a video made before his death.

U.S. President Barack Obama ordered Friday's mission because "there were compelling reasons to believe Mr. Somers' life was in imminent danger," Defense Secretary Chuck Hagel said.

A video of Somers pleading for his life was released earlier this week by al Qaeda in the Arabian Peninsula. AQAP gave the U.S. three days to comply with unspecified demands. Time was running out.

JUST WATCHED American hostage pleads for his life Replay More Videos ... MUST WATCH American hostage pleads for his life 01:50

Arrangements for Korkie's release may have been missed by the White House.

The Obama administration assessed that there were two individuals at the location but did not know one was South African or that negotiations were under way for his release, a senior State Department official told CNN.

Korkie and his wife were abducted in May of last year, but AQAP subsequently let his wife go. On Friday, a team of local leaders was finalizing arrangements to reunite Korkie with his wife and children, the relief group said in a statement.

Obama's decision

The President condemned AQAP's killing of the two hostages and explained his decision to authorize the rescue attempt.

"Earlier this week, a video released by his terrorist captors announced that Luke would be killed within 72 hours," Obama said in a statement. "I also authorized the rescue of any other hostages held in the same location as Luke."

Secretary of State John Kerry said in a statement that the President had received a recommendation to authorize the operation.

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."

South Africa's Department of International Relations and Cooperation expressed its "deepest condolences to the family and friends of Mr Korkie for their loss. Condolences are also conveyed to the family and loved ones of the deceased American hostage."

'They lost the element of surprise'

The operation took place Friday at 5 p.m. ET, a U.S. official told CNN.

On Thursday, the Defense Department became aware of enough new intelligence about the location of the hostages to stage a rescue mission, the official said. A senior Defense Department official traveling with Hagel in Afghanistan said that the operation was accelerated because there was intelligence that Somers would be killed on Saturday morning, Eastern time.

Obama and Hagel were briefed the next day.

Two Osprey aircraft transported a team of about three dozen U.S. Navy SEALs, mainly from SEAL Team 6, and a combat medical team near the captives' location. There were no Yemeni forces with the U.S. commandos.

The official traveling with Hagel said that once the Ospreys landed, the team had to trek about 10 kilometers (6 miles) to the compound.

They were discovered about 100 meters from the location where Korkie and Somers were being held, according to that official. The main part of the assault lasted five to 10 minutes.

"They lost the element of surprise at the last minute as they approached the compound," the official said.

It was not clear where the kidnappers were when the firefight started, but the official said that the U.S. is certain that someone ran back inside the compound and shot Korkie and Somers after the battle broke out. The official would not specify how it could be certain of that detail.

Difficult, 'precision' mission

U.S. forces were on the ground for about 30 minutes, an official told CNN. They stayed for that length of time because the combat medical team was trying to stabilize the two wounded hostages.

According to another official, the hostages were loaded onto a plane and flown to a nearby U.S. ship.

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 that 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 one where U.S. and Yemeni forces had carried out a previous raid.

This rescue mission was particularly difficult, due in part 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

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 gunbattle 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 be killed 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.

Pleading for his life

Somers' brother and mother posted a response video to YouTube in which they pleaded with the militants to spare him.

"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.

Paula Somers thanked his captors for taking good care of him, 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.

Tik Root, a former freelance journalist, met Luke Somers when they were both in Yemen.

"Of all the people I met in Yemen, Luke is certainly not the person that should have happened to," Root told CNN. "He was passionate about the country, its people, and he was just a very thoughtful, quirky guy."

"I didn't know him particularly well but we did cross paths about a dozen times," Root said. "He was really dedicated to Yemen."