(Reuters) - Al Qaeda in Yemen blames the United States for the death of a U.S. and South African hostage killed in a failed rescue attempt by U.S. forces, an official of the militant group said, arguing Washington had "foolishly" chosen armed force over negotiation.

U.S. President Barack Obama "and his government knew the fairness of our demands, and they could have at least negotiated with us about them, or been sincere in this matter," Nasser bin Ali al-Ansi said in a video published on Thursday by the SITE Intelligence group, which monitors Islamist militants.

"Despite our warning to him not to act foolishly ... he chose a military solution, which failed before and failed once again."

American journalist Luke Somers, 33, and South African teacher Pierre Korkie, 56, were shot by their kidnappers during the raid on Saturday in the arid Wadi Abadan district of Shabwa, one of al Qaeda's most formidable strongholds, U.S. officials said.

Residents said a woman, a 10-year-old boy and a local al Qaeda leader were among at least 11 people also killed in the shootout.

Al Qaeda in the Arabian Peninsula is seen by Washington as one of the global militant group's most dangerous branches. The United States has been bombing the group by unmanned aerial drones for years and works with Yemen's government to prevent the fighters from spreading beyond their remote hideaways in the country's south and east.

The rescue bid was the second attempt to release Somers in 10 days and followed an ultimatum by the group warning the United States to meet the group's demands within three days.

In the video al-Ansi condemned the imprisonment of a prominent Egyptian cleric and female Pakistani neuroscientist on U.S. terrorism charges, suggesting he sought their release in exchange for Somers.

Negotiations had been underway to release Korkie, Al-Ansi added, in part confirming an account by a South African charity group that was pursuing the talks on behalf of his family.

The United States has said it was aware another foreign hostage was at the location with Somers but did not know his identity or of the quiet efforts to free Korkie.

Obama stood by the raid, saying on Saturday the United States would "spare no effort to use all of its military, intelligence and diplomatic capabilities to bring Americans home safely, wherever they are located."