Two hostages held by al-Qaeda fighters in Yemen have been killed during a failed US-led rescue attempt.

American photojournalist Luke Somers and South African teacher Pierre Korkie, held by Al-Qaeda in the Arabian Peninsula (AQAP), died during the rescue operation in the southern Shabwa province on Saturday.

The raid had been ordered by US President Barack Obama over perceived "imminent danger'' to Somers. 

At least 10 al-Qaeda fighters were killed in the raid besides the hostages.

AQAP had posted a video online threatening to kill Somers, apparently prompting the rescue attempt by American forces backed by Yemeni ground troops.

Luke Somers contributed to Al Jazeera. Here are some of his works:

In Pictures: A selection of Luke Somers' work

Houthis celebrate birth of Prophet Muhammad

In Pictures: Yemen malnutrition

The US first tried to free him on November 25, which resulted in the rescue of eight other captives but not Somers, who had been moved by his captors before the raid.

Somers, 33, who was abducted in September 2013 while he worked as a freelance photojournalist for the Yemen Times newspaper, died from injuries sustained during the rescue attempt.

Lucy, Somers' sister, was quoted by the Assoicated Press news agency, as saying that she was informed by the FBI of his death.

"We ask that all of Luke’s family members be allowed to mourn in peace," she said.

For its part, Gift of the Givers, a South African Islamic aid group, which was helping with negotiations to secure Korkie's freedom, said he was to be released on Sunday and his wife was told only on Saturday morning that "the wait is almost over".

In a statement, Gift of the Givers said: "We received with sadness the news that Pierre [Korkie] was killed in an attempt by American Special Forces, in the early hours of this morning, to free hostages in Yemen.

"The psychological and emotional devastation to Yolande and her family will be compounded by the knowledge that Pierre was to be released by al-Qaeda tomorrow."

'Compelling reasons'

Speaking in Kabul on Saturday during a visit to Afghanistan, Chuck Hagel, US defence secretary, said there were "compelling reasons" to believe Somers' life was in danger before the rescue operation was launched.

"Yesterday by the order of the president of the United States, US special operations forces conducted a mission in Yemen to rescue a US citizen Luke Somers and any other foreign nationals held hostage with him," he said.

"There were compelling reasons to believe Somers' life was in imminent danger."

The New York Times said Somers was shot at by his captors as the joint raid by US and Yemeni forces unfolded and was badly wounded when the commandos reached him.

Live Box 2014922125212206854

He died while being flown to a US naval base in the region, according to a report on the newspaper's website.

Nasser Arrabyee, a Yemeni journalist, told Al Jazeera the fighters originally tried to escape with Somers, but decided to shoot him when they found themselves surrounded.

In the video released by AQAP on Thursday, Somers was seen pleading for help while his captors gave warning that "he would meet his inevitable fate" unless their demands were met within three days.

Somers was a regular contributor to Al Jazeera English, chronicling anti-government protests in Sanaa and documenting ordinary people's voices through this photography.

Paying tribute to Somers, Imad Musa, head of Al Jazeera English Online, said: "Between 2011 and 2013, Luke's insightful reporting and photos from Yemen were always welcome on our website.

"The world has lost the voice of a brave human being and open-minded journalist who could deftly explain the complexities of the situation in Yemen."

Source: Al Jazeera and agencies