British-born Luke Somers was being held in Yemen by al-Qaida militants after being kidnapped in September 2013

US president Barack Obama has condemned the “brutal murder” of American photojournalist Luke Somers, who was shot by his al-Qaida captors during a rescue mission by US special forces.

The 33-year-old was shot during the rescue attempt on Saturday morning and died while being transferred to a warship by American troops. A South African teacher being held with him, Pierre Korki, was also killed in the raid.

“On behalf of the American people, I offer my deepest condolences to Luke’s family and to his loved ones,” Obama said in a statement.

“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. And terrorists who seek to harm our citizens will feel the long arm of American justice.

“The callous disregard for Luke’s life is more proof of the depths of Aqap’s (al-Qaida in the Arabian Peninsula) depravity, and further reason why the world must never cease in seeking to defeat their evil ideology.”

An aid group helping negotiate the release of South African Pierre Korkie said he was to be freed Sunday and his wife was told on Saturday morning: “The wait is almost over.”

The raid took place in the southern region of Shabwa and was the second attempt in the past fortnight to rescue British-born Somers, who had been held for more than a year. On Wednesday his captors released a video of him pleading for help, and threatened to kill him by the end of the week if their demands were not met.

The area of Yemen where the unsuccessful rescue operation took place. Credit: Guardian Graphics

That message may have pushed Washington, which does not pay ransoms for American captives, to launch a second risky rescue bid. US defense secretary Chuck Hagel said the failed raid was justified.

“There were compelling reasons to believe Mr Somers’ life was in imminent danger,” Hagel told journalists in Kabul. “(The hostages) were murdered by Aqap terrorists during the mission.”

The two US-led operations came after a long media blackout surrounding details of Somers’ captivity. It also follows the seizure and execution of three US hostages in Syria, James Foley, Steven Sotloff and Peter Kassig and two Britons, David Haines and Alan Henning, who were all killed by the Islamic State group, to which al-Qaida in Yemen is linked.

A US raid near the Syrian city of Raqaa in June failed to find the hostages at the time, and subsequent efforts by the families of the victims to negotiate with the extremists were unsuccessful. All the while, the Obama administration and Downing Street held firm to policies of not paying ransoms.

After Kassig was beheaded in late-November, the US president said Washington’s approach to dealing with kidnappers was under review. While the two Yemen raids within a week appear to flag a more robust approach, they also underscore the enormous risks in carrying out operations deep inside insurgent territory.

It is understood Somers and other hostages had been held in chains in rugged mountain caves for much of their captivity. The photojournalist was captured in September 2013, outside a supermarket in the Yemeni capital. He had worked as a freelance photographer and as a copy editor at country’s the National newspaper.

His family, who had earlier pleaded for him to be released, asked for privacy. “We ask that all of Luke’s family members be allowed to mourn in peace,” his sister Lucy Somers told the Associated Press.

In an online video, she had described her older brother as a romantic who “always believes the best in people”. She added: “Please let him live.” His father, Michael, said Somers was “a good friend of Yemen and the Yemeni people”.

This last week’s video asking for help begins with a reading in Arabic from Nasser bin Ali al-Ansi, an official of the terrorist group, before Somers appears and gives a statement.

“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. “It’s now been well over a year since I’ve been kidnapped in Sana’a. Basically, I’m looking for any help that can get me out of this situation. I’m certain that my life is in danger.

Ansi gave the US government three days to meet the demands “otherwise, the American hostage held by us will meet his inevitable fate”. The three-minute video also features Ansi speaking about American activity in Afghanistan, Somalia and Iraq as well as recent air strikes in Syria.

British foreign Secretary Philip Hammond paid tribute to the forces involved in the rescue mission and offered his condolences to the families of Somers and Korkie.

He added: “We utterly condemn Aqap for the brutal murder of these two men. Luke had close links with the UK and his family have spoken about Luke’s life and his work, and that is how he should be remembered.”

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

“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 to the Associated Press. He said he last saw Somers the day before he was kidnapped.

“He was so dedicated in trying to help change Yemen’s future, to do good things for the people that he didn’t leave the country his entire time here,” Al Kadas wrote.

Pentagon press secretary Rear Admiral John Kirby on Thursday had acknowledged for the first time that a US raid last month had sought to rescue Somers but that he turned out not to be at the site.

Kirby did not elaborate on the joint US-Yemeni operation to free Somers, saying details remained classified. However, officials have said the raid targeted a remote al-Qaida safe haven in a desert region near the Saudi border.

Eight captives including Yemenis, a Saudi and an Ethiopian were freed. Somers, and five others had been moved days earlier.

The US considers Yemen’s al-Qaida branch to be the world’s most dangerous arm of the group as it has been linked to several failed attacks on the US homeland.