US special forces have led a successful raid on al-Qaeda militants in a cave in Yemen, rescuing eight hostages, according to two US officials.

The hostages rescued from the clutches of the terror group in their desert safe-haven known as Hagr al-Saiaar were six Yemenis, a Saudi and an Ethiopian.

However, a Yemen official has revealed that the raid failed to save five other hostages - an American journalist, a British national, a South African, a Yemeni and a Turkish national - who were moved to an undisclosed location just days before the operation.

A Yemeni special forces soldier, known only as Abu Marouf, detailed the operation on the Yemen defence ministry's online portal, saying that the operation was ordered after new intelligence came to light that hostages were being kept in caves in the desert.

He said that over 30 gunmen and soldiers launched the daring raid before dawn four miles from the Yemeni caves, being split into four groups.

One of the subgroups entered the cave and surprised the al-Qaeda militants in a shootout that killed seven of the hostages' kidnappers.

He told The Guardian: "We found the eight hostages chained. We found al-Qaida cellphones and documents," he said.

After the gunfight, helicopters picked up the soldiers and the released hostages and flew to safety, according to officials.

The operation was ordered by Yemen's President Abdu Rabbu Mansour Hadi in an "attempt to bolster the stature" of himself after rebels took the country's capital, Sana'a, in September, according to The Times.