The US government was not aware of talks to release a South African hostage in Yemen who was killed during a botched special forces raid, the US ambassador to South Africa has claimed.

South African teacher Pierre Korkie was killed on Saturday, hours before he was due to be released.

The 57-year-old had been taken hostage by al-Qaeda militants in Yemen more than a year ago.

South African relief organisation Gift of the Givers said they had negotiated for Mr Korkie to be freed and had notified his widow Yolande that he would be home soon.

However, ambassador Patrick Gaspard told a radio station the US was "completely unaware" of Mr Korkie's imminent release.

"The US government was absolutely unaware of negotiations between Gift of the Givers and these brutal al-Qaeda hostage takers," Mr Gaspard told talk radio station 702.

He said the US was also unaware that Mr Korkie was being held in the same location as US photojournalist Luke Somers.

Mr Somers was also killed in Saturday's failed raid by US forces in Yemen's southeastern Shabwa province.

Another 11 people, including a woman, a ten-year-old boy and a local al-Qaeda leader, were also killed during the raid in the village of Dafaar in Shabwa province.

"The president learned through the National Security Council that the American hostage Luke Somers faced an imminent threat," said Mr Gaspard.

"There was a video released that he would be executed within 72 hours.

"Upon that information ... President Obama authorised a rescue mission to attempt to free Mr Somers so that he would not face the same fate that we've seen others endure recently."